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 XAA30898; Fri, 4 Jul 2003 23:31:54 +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 XAA24249 for ; Fri, 4 Jul 2003 23:31:53 +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 h64LVqT25121 for ; Fri, 4 Jul 2003 23:31:52 +0200 (MET DST) Received: (qmail 20745 invoked from network); 4 Jul 2003 23:31:50 +0200 Received: from unknown (HELO debian) (vrotaru@217.77.165.37) by smtp.seznam.cz with SMTP; 4 Jul 2003 21:31:50 -0000 Date: Fri, 4 Jul 2003 22:45:21 +0200 From: Vasile Rotaru To: Ocaml Mailing List Subject: Re: [Caml-list] subtyping, polymorphism, higher order types..... Message-Id: <20030704224521.7db3450f.vrotaru@seznam.cz> In-Reply-To: <3F043EAB.70503@mitre.org> References: <3F043EAB.70503@mitre.org> 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 influences:01 oberon:01 extensible:01 ocaml:01 int:01 colour:02 syntax:02 wrote:03 types:03 color:94 jul:06 sequences:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 03 Jul 2003 10:33:15 -0400 Shaddin Doghmi wrote: > In my experiences with ocaml, one of the major frustrations i > constantly run into is the lack of subtyping. [..] The Shaddin message (and other influences -- the most notable being the Oberon language) had induced me to an idea which I offer here for discussion. Open (or extensible) product types. Something like this type point = int * int * _ ;; where the underscore stands for any sequences of types. Colour, taste, strangeness, etc. Now a function designed to work with with "point" will work with any type which is a "point" extension. Just now I cannot think of a good "ocamlish" syntax for extending types. Maybe? type color_point = * int * _ The big question is what this will do with the type system of Ocaml and whether it worth the pain.. > just a few thoughts..... > just a few thoughts Vasile Rotaru -- They spell it "da Vinci" and pronounce it "da Vinchy". Foreigners always spell better than they pronounce. -- Mark Twain ------------------- 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