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 BAA10955; Thu, 19 Sep 2002 01:01:28 +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 BAA10244 for ; Thu, 19 Sep 2002 01:01:27 +0200 (MET DST) Received: from ext-ch1gw-1.online-age.net (ext-ch1gw-1.online-age.net [216.34.191.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g8IN1Q122304 for ; Thu, 19 Sep 2002 01:01:26 +0200 (MET DST) Received: from int-ch1gw-4.online-age.net (int-ch1gw-4 [3.159.232.68]) by ext-ch1gw-1.online-age.net (8.12.3/8.9.1/990426-RLH) with ESMTP id g8IN1ICt013176; Wed, 18 Sep 2002 19:01:19 -0400 (EDT) Received: from uswaumsxbhmedge.med.ge.com (localhost [127.0.0.1]) by int-ch1gw-4.online-age.net (8.12.3/8.12.3/990426-RLH) with ESMTP id g8IN1CQq010666; Wed, 18 Sep 2002 19:01:13 -0400 (EDT) Received: by amermsx.med.ge.com with Internet Mail Service (5.5.2656.59) id ; Wed, 18 Sep 2002 18:01:10 -0500 Message-ID: From: "Gurr, David (MED, self)" To: Florian Hars Cc: caml-list@inria.fr, "Gurr David (MED Self) (E-mail)" Subject: RE: [Caml-list] Does this function exist? Date: Wed, 18 Sep 2002 18:01:03 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > -----Original Message----- > From: Florian Hars [mailto:florian@hars.de] > Sent: Tuesday, September 17, 2002 10:18 AM > To: Kontra, Gergely > Cc: caml-list@inria.fr > Subject: Re: [Caml-list] Does this function exist? > > > Kontra, Gergely wrote: > > BTW allowing polimorphism doesn't solve the problem? > > No > > > Ocaml is strictly > > typed, so one can figure out it's parameter in compile-type, right? > > Yes. This is why such a beast as requested at the start of > this thread can't be > implemented as a function, but only with some serious > compiler magic (that > breaks separate compilation) like the toplevel does. How does the toploop break separate compilation? The toploop is not magic and any user program that needs the same functionality (like a debugger) could do the same. > > How would you compile a module like: > > type verbose_list 'a = Nil | Cons of 'a * 'a verbose_list > let cons elt l = > print_string "Consing element "; > print elt; > print_string " to list "; > print l; > print_newline (); > Cons (elt, l) > > when all you know about elt at compile time is that it is > completly polymorphic? The same way that F# knows it. F# has separate compilation. Or Java, or C#, or Smalltalk, or Perl. Not that that I believe that that is a "good thing". -D > > Yours, Florian Hars. > > ------------------- > 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