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 RAA15365; Sat, 5 Jul 2003 17:53:36 +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 RAA19145 for ; Sat, 5 Jul 2003 17:53:35 +0200 (MET DST) Received: from smtp.seznam.cz (smtp.seznam.cz [212.80.76.43]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id h65FrYT14971 for ; Sat, 5 Jul 2003 17:53:34 +0200 (MET DST) Received: (qmail 8497 invoked from network); 5 Jul 2003 17:53:31 +0200 Received: from unknown (HELO debian) (vrotaru@217.77.165.37) by smtp.seznam.cz with SMTP; 5 Jul 2003 15:53:31 -0000 Date: Sat, 5 Jul 2003 17:07:06 +0200 From: Vasile Rotaru To: Ocaml Mailing List Subject: Re: [Caml-list] subtyping, polymorphism, higher order types..... Message-Id: <20030705170706.1accb8aa.vrotaru@seznam.cz> In-Reply-To: <20030705112126Q.garrigue@kurims.kyoto-u.ac.jp> References: <3F043EAB.70503@mitre.org> <20030704224521.7db3450f.vrotaru@seznam.cz> <20030705112126Q.garrigue@kurims.kyoto-u.ac.jp> X-Mailer: Sylpheed version 0.7.4 (GTK+ 1.2.10; i386-debian-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; seznam:99 caml-list:01 subtyping:01 jacques:01 extensible:01 oberon:01 ocamlc:01 -dlambda:01 pleasantly:99 tradeoff:01 coal:99 complained:01 compiler:01 ocaml:01 int:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, 05 Jul 2003 11:21:26 +0900 Jacques Garrigue wrote: > > > > type point = int * int * _ ;; > > > > where the underscore stands for any sequences of types. Colour, > > taste, strangeness, etc. ... > > This looks very much like an ocaml object type to me... > Is the absence of labels for fields important? Nor, it is not. The labels are not at all important. The same scheme will work for open/extensible records. (In fact, those are the records which are extensible in Oberon.) I have just run once the "ocamlc" compiler with the "-dlambda" option, and I was pleasantly surprised to see that access to components of a type is coded to something as simple as: (field 0 param/57) (field 1 param/57) and so on. But this means that any function which works with "point"-s (from my previous message) will work work correctly "color_point"-s, if it were allowed to. Correct me if I'm wrong, but the objects have a higher overhead. Besides -- I'm subjective, of course -- this scheme has some kind of "math appeal" to me. I know that there is and will always be a tradeoff between expressiveness of a language and its complexity, so don't take that proposal, for more than it is. Just a few thoughts. Vasile Rotaru -- It is easy to find fault, if one has that disposition. There was once a man who, not being able to find any other fault with his coal, complained that there were too many prehistoric toads in it. -- Mark Twain, "Pudd'nhead Wilson's Calendar" ------------------- 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