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 LAA08388; Fri, 28 May 2004 11:19:06 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA07771 for ; Fri, 28 May 2004 11:19:04 +0200 (MET DST) Received: from mail-in-02.arcor-online.net (mail-in-02.arcor-online.net [151.189.21.42]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i4S9J3SH012177 for ; Fri, 28 May 2004 11:19:04 +0200 Received: from rz.zidlicky.org (dialin-145-254-246-101.arcor-ip.net [145.254.246.101]) by mail-in-02.arcor-online.net (Postfix) with ESMTP id A3901BB7D91; Fri, 28 May 2004 11:18:59 +0200 (CEST) Received: by rz.zidlicky.org (Postfix, from userid 511) id A0FAF71363; Fri, 28 May 2004 11:17:20 +0200 (CEST) Date: Fri, 28 May 2004 11:17:20 +0200 From: Richard Zidlicky To: Christian Szegedy Cc: caml-list@inria.fr Subject: Re: [Caml-list] Looking for collaborators on a hobby project Message-ID: <20040528091720.GA1139@linux-m68k.org> References: <40B4FC4D.3070408@t-online.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <40B4FC4D.3070408@t-online.de> User-Agent: Mutt/1.4i X-Miltered: at concorde with ID 40B70407.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 2004:99 assuring:99 beginners:01 reflexive:01 ocamls:01 becuase:01 nils:01 unexpected:01 floats:01 run-time:01 python:01 bignum:01 beginners:01 compiler:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, May 26, 2004 at 10:21:33PM +0200, Christian Szegedy wrote: > I am looking for collaborators for the following project: > > I am considering to create a Ruby-like language in Ocaml. > > The main difference would be that it would be compiled > while assuring type safety. if you could create something as easy to learn, with the type safeness and speed of ocaml that would be really great, not only for beginners. Ruby is much more object oriented while Ocaml strength is the functional sort of programming. I wonder how much of the speed advantage would be retained if you turn everything (like numbers) into objects. > It would be both interpreted (first pass), then a selected > subset of methods are mapped to Ocaml classes and > they get compiled. It would be completely reflexive, > so the first pass would be able to modify the syntax tree > in any possible way. > So, the language would basically operate on itself as > a preprocessor (without type checks), then the second > phase would be done with exact type checking. not sure how much benefit this would be for the beginner.. > The Ruby (I don't plan to implement the whole language > at first, just the most important part of it.) classes > are mapped to Ocaml classes. The implementation > would only use a small part of Ocamls features. > > Anyway, you would be able to program without writing > supplying ANY type information, just like in a scripting > language, but the compiler would detect > all possible type problems. iirc there also used to be something like "static" Ruby, allowing to declare types to get more type safety. It might be worth to include some possibility to do so becuase otherwise some of the type safety might be eroded by polymorphism. Eg pretty much every variable in Ruby would turn into the object or nil polymorphism whereas catching the nils in unexpected places was typically the biggest issue I had with my Ruby proggies. > Of course, that means that > every single data (integers,floats, etc.) are wrapped > by Ocaml classes, which would effect the run-time > compared to native Ocaml code considerable. However, > according to my preliminary test, they it would be still much > faster then a Ruby (or Python) code. The main advantage > of the approach is the additional safety of type checking. do you want to support the similar type of bignum arithmetic as Ruby? > The advantage over OCaml would be: easier to learn for > beginners. Full scale polymorphism and overloading. > Of course, you can achieve the same effect right now, > but it would simplify things quite a bit. this looks like a very interesting project to me. Richard ------------------- 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