This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ and Java CNI: Check Java references


Fergus Henderson <fjh@cs.mu.oz.au> writes:

> This could be a dumb question -- I've barely glanced at the libjava code --
> but what's the rationale for writing large chunks of it in C++ rather than
> Java?

Well, most of it is written in Java.  But we use C++ for two main reasons:
access to low-level APIs, and performance.  Sometimes C++ allows you to do
things you cannot conveniently or efficiently do in Java.  CLasspath had
the goal of trying to do as much as possible in Java rather than native code;
the use of CNI makes it convenient to use C++ when appropriate.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]