C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Stealing the Java API?

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated)
View previous topic :: View next topic  
Author Message
Max Polk
Guest





PostPosted: Wed Oct 20, 2004 9:41 pm    Post subject: Stealing the Java API? Reply with quote



Is it possible to steal the Java API?

At the lowest level, everything in the Java API is already implemented as
calls to the underlying native OS. And the myriad of classes built on top of
these low-level calls could be automatically ported to C++ using an expert
system of rules. And even if you don't go that route, you can use gcc to
compile into a native library, which you could presumably link to C++ object
code.

Can or has someone done this and packaged it as a C++ library fully compatible
with the Java API that comes with a J2SE runtime environment?

I'm not thinking of a manual port by hand. I'm talking automation. Every
time a new JDK comes out, you rebuild and poof! you have a new C++ library.

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Back to top
Nicola Musatti
Guest





PostPosted: Thu Oct 21, 2004 5:31 pm    Post subject: Re: Stealing the Java API? Reply with quote



Max Polk <ux9i003 (AT) yahoo (DOT) com> wrote

Quote:
Is it possible to steal the Java API?

At the lowest level, everything in the Java API is already implemented as
calls to the underlying native OS. And the myriad of classes built on top of
these low-level calls could be automatically ported to C++ using an expert
system of rules. And even if you don't go that route, you can use gcc to
compile into a native library, which you could presumably link to C++ object
code.

Can or has someone done this and packaged it as a C++ library fully compatible
with the Java API that comes with a J2SE runtime environment?

I'm not thinking of a manual port by hand. I'm talking automation. Every
time a new JDK comes out, you rebuild and poof! you have a new C++ library.

I'm not convinced it would be as easy as you make it and even if it
was, I see no point in doing it. The Java library is obviously written
with Java in mind, that is it makes the most of Java specific features
by doing things the Java way. This is not necessarily the best way to
do things in C++, though.

You may argue that it wouldn't be that important how the library did
things internally as long as its functionality was available to C++
code. However even the library interface is Java oriented. Consider
for instance the difference between Java collection classes and the
STL containers and in general the importance generic programming has
acquired over inheritance based genericity in the C++ community.

Porting the Java library to C++ would impose a programming style that
many would consider less than perfect.

Cheers,
Nicola Musatti

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.