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.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id B78C1BC69 for ; Wed, 21 Mar 2007 03:13:38 +0100 (CET) Received: from smtp.syd.people.net.au (smtp.syd.people.net.au [218.214.225.98]) by concorde.inria.fr (8.13.6/8.13.6) with SMTP id l2L2DZBh019408 for ; Wed, 21 Mar 2007 03:13:37 +0100 Received: (qmail 30272 invoked from network); 21 Mar 2007 02:13:42 -0000 Received: from unknown (HELO coltrane.mega-nerd.net) (218.214.64.136) by smtp.syd.people.net.au with SMTP; 21 Mar 2007 02:13:42 -0000 Received: from coltrane (coltrane [192.168.1.101]) by coltrane.mega-nerd.net (Postfix) with SMTP id 979DC7B6B for ; Wed, 21 Mar 2007 13:13:34 +1100 (EST) Date: Wed, 21 Mar 2007 13:13:34 +1100 From: Erik de Castro Lopo To: caml-list@inria.fr Subject: Re: [Caml-list] Re: Why isn't -rectypes command line option the default Message-Id: <20070321131334.e381b5fb.mle+ocaml@mega-nerd.com> In-Reply-To: <87vegvv01u.fsf@pps.jussieu.fr> References: <20070321113430.f32c802a.mle+ocaml@mega-nerd.com> <87vegvv01u.fsf@pps.jussieu.fr> Organization: Erik Conspiracy Secret Labs X-Mailer: Sylpheed version 2.3.0beta5 (GTK+ 2.8.20; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 460094CF.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 -rectypes:01 recursive:01 -rectypes:01 cheers:01 mutable:01 garbage:01 wrote:01 rec:01 behaviour:01 caml-list:01 lazy:02 types:03 erik:04 erik:04 Zheng Li wrote: > So the main consideration is safety, though it's really fun to play with > recursive types sometimes. Ok, I can see why they aren't on by default, but using -rectypes on the whole file exposes to the whole file to these errors. Wouldn't it be nicer to be able to specify the rectypes behaviour per type? Maybe something like this would work: rec type 'a t = 'a * 'a t Lazy.t Cheers, Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo +-----------------------------------------------------------+ "Mutable state is actually another form of manual memory management: every time you over-write a value you are making a decision that the old value is now garbage, regardless of what other part of the program might have been using it." -- Paul Johnson