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 TAA27398; Fri, 8 Oct 2004 19:18:31 +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 TAA27374 for ; Fri, 8 Oct 2004 19:18:30 +0200 (MET DST) Received: from ZIVLNX01.uni-muenster.de (ZIVLNX01.UNI-MUENSTER.DE [128.176.188.24]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i98HITcA013589 for ; Fri, 8 Oct 2004 19:18:30 +0200 Received: from localhost (unknown [127.0.0.1]) by ZIVLNX01.uni-muenster.de (Postfix) with ESMTP id 2666936922; Fri, 8 Oct 2004 19:18:28 +0200 (CEST) Received: from ZIVLNX01.uni-muenster.de ([127.0.0.1]) by localhost (ZIVLNX01 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 17608-07; Fri, 8 Oct 2004 19:18:27 +0200 (CEST) Received: from [128.176.150.35] (VPNPOOL01-0025.UNI-MUENSTER.DE [128.176.150.35]) by ZIVLNX01.uni-muenster.de (Postfix) with ESMTP id 632CD36926; Fri, 8 Oct 2004 19:18:26 +0200 (CEST) In-Reply-To: <4166A764.3010905@baretta.com> References: <4166A764.3010905@baretta.com> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <185208E8-194E-11D9-A910-0003937628DA@uni-muenster.de> Content-Transfer-Encoding: 7bit Cc: caml-list@inria.fr From: Wolfgang Lux Subject: Re: [Caml-list] Recursive lists Date: Fri, 8 Oct 2004 19:18:39 +0200 To: Alex Baretta X-Mailer: Apple Mail (2.619) X-Virus-Scanned: by amavisd-new at uni-muenster.de X-Miltered: at nez-perce with ID 4166CBE5.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; wlux:01 uni-muenster:01 caml-list:01 baretta:01 cyclic:01 cyclic:01 semantically:01 ocaml:01 imho:01 alex:01 rec:01 rec:01 wolfgang:02 wolfgang:02 module:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Alex Baretta wrote: > Lists can be recursive. This means that the list type models a set of > values which includes the cyclic lists. The ocaml type system allow > both for such values and for functions manipulating them, so it's > perfectly natural to expect the List module to treat cyclic lists > correctly. IMHO it is absolutely not natural to expect this in a language with eager evaluation. After all, a cyclic list is semantically equivalent to an infinite value, i.e., it is equivalent to bottom. And we all know that f bottom = bottom in a strict language. In addition, have a look at the manual which clearly states (Sect. 6.7.1) that the behavior of let rec for non-functional values like let rec l2 = 100 :: l2 is implementation dependent. Regards Wolfgang ------------------- 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