From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id A64C4BC0A for ; Wed, 4 Apr 2007 05:53:15 +0200 (CEST) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l343rEJI018673 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 4 Apr 2007 05:53:15 +0200 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HYwYV-0006HO-KY for caml-list@inria.fr; Wed, 04 Apr 2007 05:53:07 +0200 Received: from bas1-montreal42-1178030101.dsl.bell.ca ([70.55.80.21]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Apr 2007 05:53:07 +0200 Received: from monnier by bas1-montreal42-1178030101.dsl.bell.ca with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Apr 2007 05:53:07 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Stefan Monnier Subject: Re: How important are circular lists/recursive objects? Date: Tue, 03 Apr 2007 23:52:54 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: bas1-montreal42-1178030101.dsl.bell.ca User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux) Cancel-Lock: sha1:XMUaLEJMww10WsPP7VxKlu6YTUI= Sender: news X-Miltered: at discorde with ID 4613212A.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; recursive:01 recursive:01 sml:01 ocaml's:01 functions:01 data:02 structures:02 rarely:02 construct:02 objects:02 problem:05 trick:06 anybody:07 useful:08 actually:10 > The question is: if this behavior was completely outlawed, and either you > couldn't build up circular lists/recursive data structures of this type at > all, or had to call special functions (List.circularize, say), to create > them, would this be a signifigant problem? Does anyone actually use this > construct, and if so, for what? This is the case in SML: you need to go through a `ref' cell in order to create a cycle. This has very rarely been presented as a serious limitation. OCaml's trick is occasionally useful, but I don't think anybody would lose her sleep over it. Stefan