Version française
Home     About     Download     Resources     Contact us    
Browse thread
[ANN] OCaml-Java project: 1.1 release
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Warren Harris <warren@m...>
Subject: Re: [Caml-list] [ANN] OCaml-Java project: 1.1 release

--Apple-Mail-14--958821425
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed;
	delsp=yes
Content-Transfer-Encoding: 7bit


On Nov 11, 2008, at 8:17 AM, forum@x9c.fr - forum@x9c.fr wrote:

>
> Your (dual) suggestion of compilation of Java sources
> into either OCaml sources of OCaml binaries for ocamlrun
> (or even interpretation of Java bytecode) is interesting.
> The Java language is clearly easy to parse, type, and
> compile. However, the runtime support library would
> be quite large (listing only the first items that come to
> mind):
>  - implementation of a 'native' method from the JDK;

As the original designer of the Java native method mechanism (JRI at  
netscape which became JNI at Sun)... I'll be the first to say that I'd  
be very happy to write all my native methods using ocaml's methodology.

>
>  - explicit encoding of the algorithm for message dispatch;
>  - explicit encoding of elements need by the reflection
>    mechanism.

Reflection is another feature of Java that one could get pretty far  
without. Certainly when porting an application to a new VM this would  
be a consideration, but when developing a new application, there are  
simple alternatives that avoid much of the need for reflection.

>
> At the opposite, the Java compiler performs the bare minimum
> checks. Then, at runtime the bytecode is verified before
> execution. More, through the security manager some
> checks are done at runtime to verify if the JVM is allowed
> to access a file, open a network connection, etc.
> All these runtime checks are obiously needed to grant the
> user that some code will not harm its computer (e.g. inside
> applets).

Java's focus on downloaded applet security and JIT compilation made a  
lot of sense in the browser world, but is somewhat useless in a server  
context, which is where most java applications are deployed today. I  
think that a server-only subset of Java could make a lot of sense,  
particularly in conjunction with a VM such as ocaml's that provides  
superior performance and footprint. I think many developers would  
happily sacrifice a few language features for performance.

Warren
--Apple-Mail-14--958821425
Content-Disposition: attachment;
	filename=smime.p7s
Content-Type: application/pkcs7-signature;
	name=smime.p7s
Content-Transfer-Encoding: base64

MIAGCSqGSIb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