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 SAA30001; Fri, 31 Jan 2003 18:42:54 +0100 (MET) 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 SAA30265 for ; Fri, 31 Jan 2003 18:42:53 +0100 (MET) Received: from grace.speakeasy.org (grace.speakeasy.org [216.254.0.2]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id h0VHgqP25284 for ; Fri, 31 Jan 2003 18:42:52 +0100 (MET) Received: (qmail 13000 invoked by uid 36130); 31 Jan 2003 17:42:51 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 31 Jan 2003 17:42:51 -0000 Date: Fri, 31 Jan 2003 09:42:51 -0800 (PST) From: brogoff@speakeasy.net To: Brian Hurt cc: james woodyatt , The Trade Subject: Re: [Caml-list] @, List.append, and tail recursion In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, 31 Jan 2003, Brian Hurt wrote: > On Thu, 30 Jan 2003, james woodyatt wrote: > > Apparently, nobody seemed to notice what I was talking about. So I'm > > going to try to make my point again. Sorry if you got it the first > > time. > > I did get it the first time. I'm just using List.append to illustrate a > problem I'm having. You don't even need to be mapping to a particularly long list, since your mapping function may be consuming stack space too. The stuff using set_cdr was only ugly if you look under the hood. No one complains about other hidden uses of Obj, so that aproach may make sense as an immediate fix. The main point to me is that since there appears to be a reasonable approach to doing all of this stuff in a safe way that extends the power of ML, it may be a good idea to consider removing this limitation in a future (Ca)ML. There are only a few places where the language itself has annoying limitations, and I'm beginning to believe that this is one of them. The implementation provides a workaround as Olivier demonstrated, but the inability to express this in OCaml is a hole that perhaps needs to be filled (pun intended :). -- 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