From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA23049 for caml-red; Thu, 11 Jan 2001 10:31:24 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA09213 for ; Thu, 11 Jan 2001 08:02:13 +0100 (MET) Received: from localhost.localdomain (cartman21.zip.com.au [61.8.20.149]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f0B72AT28656 for ; Thu, 11 Jan 2001 08:02:10 +0100 (MET) Received: from ozemail.com.au (IDENT:root@localhost [127.0.0.1]) by localhost.localdomain (8.9.3/8.8.7) with ESMTP id SAA03514; Thu, 11 Jan 2001 18:00:36 +1100 Message-ID: <3A5D5A14.8EC2F7AB@ozemail.com.au> Date: Thu, 11 Jan 2001 18:00:36 +1100 From: John Max Skaller X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: Dave Berry CC: Markus Mottl , OCAML Subject: Re: JIT-compilation for OCaml? References: <3145774E67D8D111BE6E00C0DF418B663AA6EC@nt.kal.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: weis@pauillac.inria.fr Dave Berry wrote: > > This view seems extreme to me. Certainly the Java type system has faults -- > lack of generics being one, lack of enumerated types another, and various > other points as well. But surely Unicode is a useful de facto standard? No. Unicode was abandoned years ago: there is an 'offical' ISO Standard: ISO-10646. There are 2^31 code points, unlike Unicode's 2^16, which is already barely adequate. ISO C and ISO C++ support ISO-10646. Linux runs ISO-10646 (via UTF-8). > Using C syntax was a strong point -- it made the language familiar to many > people. This is a selling point: Felix also uses a C like syntax, but it fixes the worst deficiency in C/C++, namely declarator syntax, indeed Felix is LR(1) [works with ocamlyacc] and unambiguous except for the usual 'dangling else' ambiguity. A competent C/C++ programmer had no trouble learning it in a few minutes. It isn't hard to learn: val x: int = 1; function f(x:int) { .. } although I often make the mistake: function f(int x) { .. } myself, being an (ex-)C/C++ programmer :-) > IMO Java syntax does avoid many of the worst aspects of C syntax > (e.g. pointers). Really, this is a matter of semantics rather than syntax. Java uses references and a garbage collector, which I agree can have advantages over pointers and manual storage control. Felix uses pointers, but they cannot be NULL, and it uses a garbage collector: syntactically you have to form them by addressing (&variable) and use them with dereferencing (*pvariable). I don't think the syntax is that much of an issue -- in Ocaml, you have to dereference references too. > It's surely portable: JVMs run on many systems. Sure. With restricted functionality. To get 'many real' programs to work you need native code extensions. > It certainly isn't slow to compile, The version of Java I used (1.2) was so slow as to be unusable. It ran THOUSANDS of times slower than g++. (And ocaml is even faster!) Perhaps this has changed recently. > and a previous poster suggested that with > modern compilers run-time performance is not too bad. You can access C or > C++ functions from Java using JNI (although you seem to be in two minds as > to whether C compatibility is desirable or irrelevant). Like I said, there goes portability :-) > And this omits it's plus points, especially its utility in net programming. > Its security model is not the last word, but it's better than C, C++ or > Eiffel! And its use of byte code ensures portability of compiled apps. Python and Ocaml also use portable bytecodes. Python at least is every bit as good at 'net' programming as Java, and faster to develop with. I dare say, that with some basic libraries, Ocaml would be vastly superior at 'net' programming, simply because it is vastly superior as a programming language :-) For example, Ocaml runs on MS's .net platform. -- John (Max) Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net