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 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 0125ABC0A for ; Mon, 21 May 2007 15:30:10 +0200 (CEST) Received: from looneymail-a5.g.dreamhost.com (d071c805.dreamhost.com [208.113.200.5]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4LDU9aL011415 for ; Mon, 21 May 2007 15:30:10 +0200 Received: from [192.168.101.113] (unknown [66.84.219.53]) by looneymail-a5.g.dreamhost.com (Postfix) with ESMTP id 41487122E67; Mon, 21 May 2007 06:30:12 -0700 (PDT) Message-ID: <46519EDF.5060505@SmokejumperIT.com> Date: Mon, 21 May 2007 08:30:07 -0500 From: Robert Fischer Organization: Smokejumper Consulting User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Basile STARYNKEVITCH Cc: caml-list@inria.fr Subject: Re: [Caml-list] tail rec References: <1179543365.26755.33.camel@rosella.wigram> <4651973F.9010503@janestcapital.com> <465198E5.3010004@SmokejumperIT.com> <20070521152116.70d642b0.basile@starynkevitch.net> In-Reply-To: <20070521152116.70d642b0.basile@starynkevitch.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 46519EE1.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; annotation:01 recursive:01 emacs:01 recursion:01 beginner's:01 experimented:01 ocaml:01 recursive:01 recursion:01 imho:01 rec:01 compile:01 typing:01 caml-list:01 tail:01 > I'm repeating my suggestion: extend the typing annotation (produced by -dtypes) to flag every tail recursive call, and have the emacs mode and ocamlbrowser display every tail call particularily (e.g. in a different color or font). > > This don't require any additional language construct. > Oh, then we're cool. :-D > Also, tail recursion is IMHO a beginner's puzzle. I'm pretty sure every experimented Ocaml programmer does know inside his code what are his tail recursive calls. > If you asked me to point them out, I could. If you asked me if a given function is tail recursive, I could tell you. I also use tail recursive calls unintentionally, and (while I realize now that you're not proposing this) I was concerned my code suddenly wouldn't compile because I didn't happen to tag a tail recursion. Robert Fischer IT Firefighter Smokejumper Consulting