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 GAA02383; Sat, 1 May 2004 06:38:51 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id GAA02287 for ; Sat, 1 May 2004 06:38:50 +0200 (MET DST) From: brogoff@speakeasy.net Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i414cmSH015335 for ; Sat, 1 May 2004 06:38:49 +0200 Received: (qmail 31631 invoked from network); 1 May 2004 04:38:45 -0000 Received: from grace.speakeasy.net ([216.254.0.22]) (envelope-sender ) by mail1.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 1 May 2004 04:38:45 -0000 Date: Fri, 30 Apr 2004 21:38:44 -0700 (PDT) To: skaller cc: caml-list Subject: Re: [Caml-list] List.rev In-Reply-To: <1083376750.2581.183.camel@pelican.wigram> Message-ID: References: <20040430175429.GB11118@online.fr> <4092A448.6080909@1969.ws> <1083376750.2581.183.camel@pelican.wigram> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at concorde with ID 409329D8.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; brogoff:01 caml-list:01 crashes:01 curse:01 recursion:01 implemented:01 bug:01 ocaml:01 ocaml:01 speakeasy:01 complexity:02 exception:02 stack:02 modulo:02 wrote:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, 1 May 2004, skaller wrote: > BTW: documentation that says a function is 'tail recursive' > is misguided. That's an implementation detail of no > possible use to a user of the function. The user may > benefit from knowing the complexity of the function > in terms of speed and auxilliary storage required. You couldn't be more wrong. When your program crashes because you've blown stack and you're embarassed as all hell (you never expected the user to run with *that* big of an input) you remember that documentation and curse your own carelessness, rather than the OCaml team. Since Ocaml optimizes tail calls, that info *is* about auxiliary storage. On the same point, it would be a good thing if OCaml had a better solution to these "tail recursion modulo cons" issues than writing set_cdr using Obj functions. Better means "in the language" here; I'm aware that various libraries have implemented the set_cdr approach. There's only a handful of things that bug me about the OCaml language, and this makes the list. I'd append it to the list, but it might raise an exception ;-). -- 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