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=1.3 required=5.0 tests=SPF_FAIL autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id CA578BC0A for ; Tue, 3 Apr 2007 08:30:10 +0200 (CEST) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l336UAYx016119 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 3 Apr 2007 08:30:10 +0200 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1HYcWo-0003g1-Fz for caml-list@inria.fr; Tue, 03 Apr 2007 08:30:02 +0200 Received: from fw.zoral.com.ua ([213.186.206.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 03 Apr 2007 08:30:02 +0200 Received: from gleb.alexeev by fw.zoral.com.ua with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 03 Apr 2007 08:30:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Gleb Alexeyev Subject: Re: How important are circular lists/recursive objects? Date: Tue, 03 Apr 2007 09:24:32 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: fw.zoral.com.ua User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) In-Reply-To: Sender: news X-j-chkmail-Score: MSGID : 4611F472.000 on concorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at concorde with ID 4611F472.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; recursive:01 recursive:01 ocaml:01 wrote:01 rec:01 functions:01 cyclic:01 cyclic:01 data:02 structures:02 construct:02 construct:02 objects:02 let:03 brian:04 Brian Hurt wrote: > > 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? > I do not use Ocaml for anything "real", but I think cyclic data-structures are occasionally useful. The first example that springs to mind: to implement "let rec" construct in interpreter one would need cyclic environment.