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 SAA18070; Mon, 11 Oct 2004 18:47:01 +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 SAA18092 for ; Mon, 11 Oct 2004 18:47:00 +0200 (MET DST) Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i9BGkwXC010026 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 11 Oct 2004 18:47:00 +0200 Received: (qmail 14769 invoked from network); 11 Oct 2004 16:46:57 -0000 Received: from shell2.speakeasy.net ([69.17.110.71]) (envelope-sender ) by mail1.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 11 Oct 2004 16:46:57 -0000 Date: Mon, 11 Oct 2004 09:46:57 -0700 (PDT) From: brogoff To: Caml List Subject: Re: [Caml-list] About Obj (was Recursive lists) In-Reply-To: <00F89380-1BA2-11D9-B4CE-000A958FF2FE@wetware.com> Message-ID: References: <41669437.3010201@yahoo.it> <4166A395.70301@yahoo.fr> <4166DC42.3090602@baretta.com> <16746.15832.409677.764564@gargle.gargle.HOWL> <416A8CDA.7060407@univ-savoie.fr> <00F89380-1BA2-11D9-B4CE-000A958FF2FE@wetware.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at nez-perce with ID 416AB902.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; brogoff:01 brogoff:01 caml-list:01 woodyatt:01 38,:01 raffalli:01 filliatre:01 sensibly:01 immutable:01 extlib:01 workarounds:01 gcaml:01 recursion:01 christophe:01 implementors:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, 11 Oct 2004, james woodyatt wrote: > On 11 Oct 2004, at 06:38, Christophe Raffalli wrote: > > Jean-Christophe Filliatre wrote [quite sensibly]: > >> > >> [...] > >> This shouldn't be advised, and not even posted on this list. > > > > And how do you write a tail recursive map doing only one structure > > traversal (which is important with the penalty for memory access) on > > immutable list without the Obj module ? > > By using a more appropriate data structure, e.g. a lazy list. It's a > pay-me-now-or-pay-me-later sort of game you're playing here. Count me among those entirely unswayed by this. You could also respectfully request that the implementors provide a safe way to get this well known optimization WITHOUT having to resort to Obj usage, and, until it is provided, use the safe solution provided a few times already (and used in ExtLib I believe). When I asked one of the implementors about this, I received the response that this would be nice to have but not at the head of the queue in terms of upcoming desireable features. That seems like a reasonable response, considering that there are a number of not so bad workarounds, including use of Obj. I'd rather have GCaml extensions sooner anyways... I think Clean now provides some solution for the tail recursion modulo cons stuff. Anyone know other language/implementations which do? -- Brian ------------------- 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