CNI for C
Geert Bevin
gbevin@uwyn.com
Wed Apr 7 11:45:00 GMT 2004
On Wed, 2004年04月07日 at 13:23, Andrew Haley wrote:
> Geert Bevin writes:
> >
> > is there anything underway to offer something similar to CNI but then
> > for C and not for C++?
>> We haven't been working on this.
>> How would you do it? What is the C equivalent of the this pointer, or
Honestly it's been too long since I looked at C to make comments on the
internals of such an implementation, but I'll think about it in more
detail in the coming days. Maybe it doesn't have to be CNI-related at
all and just a very easy to use C binding mechanism.
> a virtual function? I suppose we could write a bunch of macros to do
> the job, but would anyone use them?
>> > The Gnome project has been working very hard on Mono since "it
> > provides much better C integration than java". If GCJ would provide
> > an easy way to create native C bindings, then there's a much better
> > chance for it being adopted more widely in the Gnome community and
> > Java becoming a worthy alternate development language for it.
>> That's a very interesting idea. However, the resistance to using CNI
> has been that
>> * We can't use VM-specific features that may be useful, such as CNI.
> <http://ometer.com/desktop-language.html>
>> So even if we did create C-CNI, wouldn't this still be the case?
> People would still not want to use it, because it's VM specific.
I can't speak for others, but I hear all the time that Mono is not about
being compatible with .Net and simply to provide a nicer environment for
Gnome development. If you continue on this line of thinking, you can say
the same for GCJ. Since GCC is pretty much available on all the
platforms that Gnome runs on, I think it's fairly safe to rely on
GCC-specific features. Running native code isn't portable anyway and
very specific to the target platform. So it being available as a
standard in all Java implementations is not so important imho.
What I do know is that the easy C integration is making Mono and C#
gaining more and more momentum, while a perfectly functional
free-from-patents technology exist with GCJ. As I see it, easy
integration with C is a minor addition to what is already a very stable
and comprehensive platform.
--
Geert Bevin Uwyn bvba
"Use what you need" Rue Victor Cuvelier 57
http://www.uwyn.com 7190 Ecaussinnes
gbevin[remove] at uwyn dot com Tel +32 67 78 04 06
PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9
Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net
More information about the Java
mailing list