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 VAA16493; Thu, 2 May 2002 21:28:52 +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 VAA16491 for ; Thu, 2 May 2002 21:28:52 +0200 (MET DST) Received: from ext-nj2gw-3.online-age.net (ext-nj2gw-3.online-age.net [216.35.73.165]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g42JSpD10547 for ; Thu, 2 May 2002 21:28:51 +0200 (MET DST) Received: from int-nj2gw-3.online-age.net (int-nj2gw-3.online-age.net [3.159.236.67]) by ext-nj2gw-3.online-age.net (8.9.3+Sun/8.9.1/990426-RLH) with ESMTP id PAA22402; Thu, 2 May 2002 15:28:50 -0400 (EDT) Received: from uswaumsxb4medge.med.ge.com (localhost [127.0.0.1]) by int-nj2gw-3.online-age.net (8.9.3+Sun/8.9.1/990426-RLH) with ESMTP id PAA25941; Thu, 2 May 2002 15:28:49 -0400 (EDT) Received: by USWAUMSXB4MEDGE with Internet Mail Service (5.5.2653.19) id ; Thu, 2 May 2002 14:27:28 -0500 Message-ID: From: "Gurr, David (MED, self)" To: Benedikt Grundmann Cc: caml-list@inria.fr Subject: RE: [Caml-list] Modules and typing Date: Thu, 2 May 2002 14:27:25 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, the .cmx files generated by ocamlopt do some of what you mention. -D > -----Original Message----- > From: Benedikt Grundmann [mailto:bgrundmann@gmx.net] > Sent: Thursday, May 02, 2002 5:31 AM > To: Gregory Morrisett > Cc: Francois.Pottier@inria.fr; skaller@ozemail.com.au; > caml-list@inria.fr > Subject: RE: [Caml-list] Modules and typing > > > > > + require that abstract types are pointer types, as in > > > Modula-3 (?) and, more > > > recently, Cyclone > > > > Actually, Cyclone has two different kinds of abstract types: > > One abstracts pointer types (really, types that are compatible > > with void*) and another kind that abstracts any type. The latter > > kind can only be used under a pointer. I think this > corresponds more > > closely to what Modula-3 provides with it's notion of "ref" > > types. > > > > There's another option that you didn't mention which is the approach > > taken by Ada: Have a notion of "private" types in interfaces, e.g. > > > > type t > > [private t = int] > > > > The client is type-checked with t treated abstractly, but the > > compiler can then specialize the client knowing what the > implementation > > of t is. Of course, by leaking this information into the interface, > > you're effectively losing separate compilation in the sense that > > if the implementation of t changes, then its interface must also > > change and all clients must then be (potentially) re-compiled. But > > this is a simple option which avoids some of the complexity that > > you run into if you try to use abstract kinds to classify types > > according to implementation details that a compiler might need > > (e.g., size, calling-convention, and alignment constraints.) > > > > -Greg > > Another option related to this is to generate a compiler only > interface file > (maybe even binary). Which contains everything the compiler > needs to know > about the implementation of an interface. Everything > mentioned above applies > to this solution too, with the added benefit that a reader of > the interface > can't make stupid assumptions about the implementation which > might not be true > in the next release :-) > > > Bene > > -- > GMX - Die Kommunikationsplattform im Internet. > http://www.gmx.net > > ------------------- > 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 ------------------- 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