From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 387E0BC32 for ; Fri, 18 Mar 2005 00:30:59 +0100 (CET) Received: from first.in-berlin.de (dialin-145-254-054-039.arcor-ip.net [145.254.54.39]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j2HNUtsc013356 for ; Fri, 18 Mar 2005 00:30:57 +0100 Received: by first.in-berlin.de (Postfix, from userid 501) id 57AB9BD426; Thu, 17 Mar 2005 22:31:44 +0100 (CET) Date: Thu, 17 Mar 2005 22:31:43 +0100 From: Oliver Bandel To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] OCaml troll on Slashdot Message-ID: <20050317213143.GB397@first.in-berlin.de> References: <20050316001819.GB347@first.in-berlin.de> <891bd33905031619484825e276@mail.gmail.com> <200503171016.18310.jon@ffconsultancy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-Miltered: at nez-perce with ID 423A132F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; oliver:01 bandel:01 oliver:01 in-berlin:01 caml-list:01 ocaml:01 ocaml:01 caml-list:01 bignums:01 int's:01 ocamlc:01 ocamlc:01 ocamlopt:01 ocamlopt:01 ...:98 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.2 X-Spam-Level: On Thu, Mar 17, 2005 at 10:06:45AM -0800, brogoff wrote: [...] > Also, as I state above, the number is arbitrary, and having OCaml choke at some > particular size rather than letting me use large lists violates that least > surprise principle. I had an offline discussion recently with another caml-list > person in which he told me that he wished OCaml used Bignums instead of int's > by default. I disagree, but I don't think it's a dumb idea. The behavior of > the standard List functions is worse IMO. Maybe the standard Lisp.map should be > named List.unsafe_map (1/2 :-))? Well, or call ocaml ocaml_unsafe, ocamlc ocamlc_unsafe ocamlopt ocamlopt_unsafe as long as they are not able to convert simple-recursive programs into tail-recursive programs (per default or per cli-option or at all). > > I realize that this problem can be coded around, sometimes with better data > structures, or by the double reversing approach (which is what I used to use) > but my own sense of programming language aesthetics is that this is a flaw, or > at least a hole in the language that should be filled one day. M aybe one day, the cli-switch "-tailrec-all" or "-force-tailrec" will automatically convert all functions that aren't tailrec into tailrec ones. Or maybe a pragma (something like in _inline_) will be used to convert certain functions into it's tailrec counterpart internally (maybe only when a switch "-tailrec-by-pragma" is set). Ciao, Oliver