Objective-C vs. gcj (was: Re: Newbie questions)

Jeff Sturm jsturm@sigma6.com
Sat Apr 1 00:00:00 GMT 2000


Maury Markowitz wrote:
> > Objective-C has a neat feature which makes it extremely simple to write
> > delegate classes. The runtime attempts to dispatch a method invocation
> > [snip]
> > Similar tricks could be performed with Java reflection, I'd guess.
>> That's interesting. Ahhh, do you mean that we could use the
> reflection API in the runtime to see if the method is there and then
> re-dispatch? Hmmm, that might be a "better" (as in leveraging
> existing functionality) solution that Obj-C's in fact.

Yes, Java reflection can do that. In fact, if we fully supported JNI,
you could implement a proxy in Obj-C that would forward messages to the
libgcj runtime. Essentially you could wrap a Java class in an Obj-C
class that way.
Without JNI, it would be harder... the libgcj runtime is mostly C++ and
Java, and you'd have to find some way to interact with the GC.
-- 
Jeff Sturm
jsturm@sigma6.com


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /