Re: Re: Java API

Raymond Martin <[email protected]> Tue, 21 Feb 2006 17:57:16 +0000
Newsgroups gmane.lisp.lush.devel
Message-ID <[email protected]>
Hi Leon,

On Tuesday 21 February 2006 14:58, you wrote:
> On Monday 20 February 2006 09:57 pm, Raymond Martin wrote:
> > A more compelling reason to interface to java is the extensive number of libraries
> > (many open source ones are available through the Apache project [Jakarta Commons, etc.], 
> > for instance.
> 
> A possible side effect of this would be that the bindings can be done automatically.
> Compile your library with gcj, mod-load it, and all its classes and 
> functions appear magically in lush...
> 

I'm going to try that at some point, there will be some rough spots with certain
libraries because gcj is not current with Java 1.5 (or even 1.4). This is slowly
being remedied. gcj and classpath (the project) are eventually going to merge 
into an improved open source Java. Plus the only GUI support through gcj is
either SWT or Gtk+, won't be able to use any code/libraries that refer to Swing
or AWT.

> > A version of Lush written in Java is even feasible, with the advantages of running 
> > on more platforms and being more easily maintained (working with Java is more 
> > efficient in the long term, than say C++.
> 
> That is another story. It would then make sense for the 
> lush compiler to produce java bytecode instead of C,
> and to embed a JIT in the runtime. 

I don't think this necessarily has to be the case. For instance, gcj can produce both 
bytecode and compiled code. So mixing of Java and C/C++ sources is possible to
produce the Lush executable (for current supported OS using GNU to compile).
On the other hand, for Java supported OS, then a full implementation is needed
in bytecode, that would be a major undertaking with numerous issues.

> This is certainly doable, could be interesting, but this is not lush.
> Lush uses the ordinary runtime of C programs, in order to maximally leverage 
> the huge existing code base that assumes this kind of runtime.

Like gcj does via gcc.

> If lush was using the java runtime, one would have to use an extra layer to call 
> these libraries and an extra language to deal with...

Yes, but I am definitely more interested in the case of Java going straight to 
compiled code and being gradually intermixed with C/C++ to leverage it where 
possible (with the ordinary runtime of C close at hand).

Cheers.

Raymond


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642