Ocaml to Java

From: Ohad Rodeh (orodeh@cs.huji.ac.il)
Date: Tue May 19 1998 - 14:45:57 MET DST

Date: Tue, 19 May 1998 15:45:57 +0300 (IDT)
From: Ohad Rodeh <orodeh@cs.huji.ac.il>
To: Ocaml Mailing List <caml-list@inria.fr>
Subject: Ocaml to Java

> Ohad Rodeh wrote:
> > Hi,
> > It has been brought to my attention that a compiler from
> > SML to java bytecode has been written, see:
> > http://research.persimmon.co.uk/
> >
> My opinion as an OCAML user in an "industrial" context:
> The only interest of a ML to Java compiler is that it can make your program run
> on Internet browsers.
> Not every browser supports Java correctly, implementation of Java are not
> compatible and will diverge
> completely in the future. Moreover, the Java bytecode is quite slow.
> Calves (OCAML plugin for Netscape) seems a better way of doing this... provided
> Microsoft doesn't
> change the borwser plugin specifications once they get 80% market share.
> > We, at the Ensemble project could use such a compiler. Even better
> > would be a compiler from Ocaml to Java (not bytecode).
> Here is an exemple of Java extension to ML (needed in at least one module,
> otherwise
> the MLJ compiler cannot work, as far as I understand):
> ---------------------------------------------------------
> _public _classtype MLApplet _extends Applet.Applet
> {
> _public _constructor ()
> _public _static _method "main"(env : Java.String option Java.array option)
> }
> ----------------------------------------------------------
> (extract from http://research.persimmon.co.uk/mlj/demos/gui/MLApplet.sig)
> I'm not sure people want to see this in OCAML code.
> Olivier Montanuy
> Ps: I understand perfectly that you need Java in the Ensemble project, be it
> only for "marketing" reasons.
> We have the same kind of problems here, for our internal projects. And somehow
> we are forced to write
> Java applets even if we don't believe in Java.

The problem we face is that Ocaml is not palatable for most people. The
Ensemble (our Group Communication System) code base is free and anyone
(including companies) can pick it up and use it. The problem we find is
that people are unwilling to use ML and will rather build their own
systems in Java/C/C++/SmallTalk. We believe that having a Java version of
our software will make it more accessible. This version may be
automatically generated and may not be very readable, but it will still be
100% Java which is a desirable property nowadays. At least it will compile
and link with other Java code.


This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:14 MET