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 KAA14908; Wed, 21 Aug 2002 10:07:47 +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 KAA14843 for ; Wed, 21 Aug 2002 10:07:46 +0200 (MET DST) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g7L87jP14290 for ; Wed, 21 Aug 2002 10:07:45 +0200 (MET DST) Received: from ibm3.cicrp.jussieu.fr (ibm3.cicrp.jussieu.fr [134.157.15.3]) by shiva.jussieu.fr (8.12.5/jtpda-5.4) with ESMTP id g7L87gjR077607 ; Wed, 21 Aug 2002 10:07:42 +0200 (CEST) Received: from ibm1.cicrp.jussieu.fr (ibm1.cicrp.jussieu.fr [134.157.15.1]) by ibm3.cicrp.jussieu.fr (8.8.8/jtpda/mob-V8) with ESMTP id KAA22444 ; Wed, 21 Aug 2002 10:05:58 +0200 Received: from localhost (fernande@localhost) by ibm1.cicrp.jussieu.fr (8.8.8/jtpda/mob-v8) with SMTP id KAA31366 ; Wed, 21 Aug 2002 10:04:24 +0200 Date: Wed, 21 Aug 2002 10:04:24 +0200 (DST) From: Diego Olivier Fernandez Pons To: Brian Rogoff cc: caml-list@inria.fr Subject: Re: Polymorphic recursion 9Was Re: [Caml-list] Doubly-linked list) In-Reply-To: <15713.5541.413031.271962@granite.artisan.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Antivirus: scanned by sophie at shiva.jussieu.fr Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Brian Rogoff a =E9crit > Oh I'm not arguing that point, I totally agree that it's omission is a=20 > bad thing. However, not everyone agrees, since you it becomes a lot tough= er > to build a monomorphizing compiler if you allow it, though it has been=20 > suggested that the same tricks you use to manually remove polymorphic > recursion could be used in an SSC (sufficiently smart compiler).=20 I do not agree with your analysis since I really do not believe anyone could think that polymorphic recursion is useless. But it is a _difficult_ subject and the Caml Team is working on it (you can read their research summary) Actually, I do not even think that including some tricks in the compiler is a manageable solution. > Anyways, since OCaml 3.05 allows first class polymorphism on records, you > don't even need to use "polymorphic recots" to get non-uniform recursion;= =20 > simply mapping the OOP to records does the trick. Here's the first exampl= e > from OKasaki which uses polymorphic recursion, done in OCaml with this=20 > direct approach=20 [...] Your trick is very interesting but I am afraid I cannot include that kind of code in a library whose purpose is also to be a pedagogical support for a data structure course in Caml and an example for beginners (maybe released as independent modules ?) Diego Olivier ------------------- 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