From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA01086; Thu, 26 Aug 2004 23:43:13 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 XAA01130 for ; Thu, 26 Aug 2004 23:43:12 +0200 (MET DST) Received: from nemerle.org (lilith.ii.uni.wroc.pl [156.17.4.7]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i7QLhBvl014457 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 26 Aug 2004 23:43:12 +0200 Received: from malekith by nemerle.org with local (Exim 4.32) id 1C0S1W-0004Do-QB; Thu, 26 Aug 2004 23:43:10 +0200 Date: Thu, 26 Aug 2004 23:42:23 +0200 From: Michal Moskal To: John Goerzen Cc: caml-list@inria.fr Subject: Re: [Caml-list] Alternative Bytecodes for OCaml Message-ID: <20040826214223.GA25370@roke.freak> Mail-Followup-To: John Goerzen , caml-list@inria.fr References: <200408250926.28629.jgoerzen@complete.org> <20040826.071059.48814499.yoriyuki@mbg.ocn.ne.jp> <200408251909.03050.jgoerzen@complete.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200408251909.03050.jgoerzen@complete.org> User-Agent: Mutt/1.4.2.1i X-PGP-Fingerprint: CF89 1B14 11BE 1CC9 2CA3 7497 5E32 69B4 BC71 B4C2 X-Miltered: at nez-perce with ID 412E596F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; michal:01 moskal:01 malekith:01 pld-linux:01 caml-list:01 bytecodes:01 2004:99 2004:99 yamagata:01 yoriyuki:01 200102:01 python:01 stumbling:01 recursion:01 haskell:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, Aug 25, 2004 at 07:09:02PM -0500, John Goerzen wrote: > On Wednesday 25 August 2004 5:10 pm, Yamagata Yoriyuki wrote: > > The conclusion of the F#, and several SML-to-Java bytecode projects > > is that JVM and .NET are too restricted to OO paradigm, I remember. > > See the thread begins > > http://caml.inria.fr/archives/200102/msg00048.html > > I'm not sure I buy that. For one, Python already exists for both, and I > believe it implements all the stumbling blocks commonly mentioned here > save for tail recursion optimization. Secondly, there are functional > languages existing for .NET: Nemerle, SML, Haskell (via both ghc and > Hugs), Scheme, Lisp. I hardly think that one could claim that either > VM is too limited to make an implementation. We even have preliminary > OCaml interpreters for Java, and the Nemerle language is *very* similar > to OCaml. The syntax is different, but from what I've seen, the > language is similar enough that it should be possible to make a camlp4 > printer to output in Nemerle. I guess it would be possible for Caml Light, but not for OCaml. OCaml has very sophisticated type system with regard to objects and modules. Neither of these fit with the .NET object oriented model -- it's simply too restricted. This is one of reasons Nemerle exists. It's probably possible to implement OCaml's objects using .NET objects, using one interface per method, or casting everything down to System.Object, but this doesn't seem a) pretty, b) fast nor c) interoperable. And c) is one of the main reasons .NET exists. You would at least have to add .NET-like classes and interfaces to OCaml to make using .NET libraries possible. And if you want to write libraries in such OCaml.NET, you would be restricted to these types at the edges. And this in turn means you have to have very good support for these features, and this turns out not to be so easy -- after one year of development we still don't have full support for this stuff in Nemerle. -- : Michal Moskal :: http://www.kernel.pl/~malekith :: GCS !tv h e>+++ b++ : ::: Logic is a nice contrast to the Real World. :: UL++++$ C++ E--- a? ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners