From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 4D865BBAF for ; Tue, 16 Feb 2010 17:52:41 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiMBAHdcekvUnwdkkGdsb2JhbACbGhUBAQEBCQkMBxMEH74HhFsE X-IronPort-AV: E=Sophos;i="4.49,485,1262559600"; d="scan'208";a="44911467" Received: from relay.pcl-ipout02.plus.net ([212.159.7.100]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 16 Feb 2010 17:52:41 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAHdcekvUnw4T/2dsb2JhbACbGnS+B4RbBA Received: from pih-relay06.plus.net ([212.159.14.19]) by relay.pcl-ipout02.plus.net with ESMTP; 16 Feb 2010 16:52:40 +0000 Received: from [87.114.12.249] (helo=leper.local) by pih-relay06.plus.net with esmtp (Exim) id 1NhQf9-0004wY-UM for caml-list@yquem.inria.fr; Tue, 16 Feb 2010 16:52:40 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: WAS Re: [Caml-list] Re: The need to specify 'rec' in a recursive function defintion Date: Tue, 16 Feb 2010 18:08:21 +0000 User-Agent: KMail/1.9.9 References: <756daca51002160847k1a416f01p36cc192d00e25697@mail.gmail.com> In-Reply-To: <756daca51002160847k1a416f01p36cc192d00e25697@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201002161808.21283.jon@ffconsultancy.com> X-Plusnet-Relay: d5cf02f39bacef095527563b7eb41d92 X-Spam: no; 0.00; recursive:01 defintion:01 compiler:01 compiler:01 1975:98 frog:98 wrote:01 wrote:01 rec:01 rec:01 recursively:01 caml-list:01 define:02 resolving:03 let:03 On Tuesday 16 February 2010 16:47:03 Grant Rettke wrote: > On Tue, Feb 16, 2010 at 10:21 AM, Ashish Agarwal wrote: > > let rec > > Do OCaml'er look at let rec more as being a message to the programmer, > rather than the compiler, that the way I want to define this function > is recursively so even if 'f' was previously bound you know which one > I mean? I see it as resolving an ambiguity for both the programmer and compiler. There are alternatives as others have mentioned but none seem particularly good or bad to me. Moreover, the burden of "rec" is tiny so I don't think it is worth discussing in such detail. -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e