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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 78EA6BC57 for ; Sat, 29 May 2010 23:27:11 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AicCAIMjAUzRVdQ0kGdsb2JhbACeNQgVAQEBAQkJDAcRAx+vEIQ7iH0BAQMFhREEg0iKKw X-IronPort-AV: E=Sophos;i="4.53,324,1272837600"; d="scan'208";a="63633780" Received: from mail-vw0-f52.google.com ([209.85.212.52]) by mail4-smtp-sop.national.inria.fr with ESMTP; 29 May 2010 23:27:11 +0200 Received: by vws18 with SMTP id 18so1277852vws.39 for ; Sat, 29 May 2010 14:27:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=XWzKUT967TOWkH8aits7FLaGT72MqDwLhNlsTQZh54Q=; b=mzKgigLbtV+4AEoywY3OaPQNINjqH3VnGzSDVcggQJPCmZZiIgPUHhzn2m73u+OIVm ldc28f0mrhu73de4YcfttIlPYLAj851ttx5d1EKTmX3QrPfRqVx50tcwXTI3Rn5bYjxp NwRIa6E5K5YEnzIjBn3Am5leCJMWulh+bzD/A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=A4eImd0xTvJ7Kc4EcwlPv+Wwc0i6m94jGyeFfr1xO7WTMHjjppxgX2ARtvtH54HfuY IVmdQ6dQxoVgn4OaKxduZF2WxPr/nmY4V0pcrvRX3dxIkNLVl9I+vhYcy7ciX6GYWxJ8 zRo02Kn6Sus0V0nDCDXPUaPAcFlxXVMIaama8= MIME-Version: 1.0 Received: by 10.220.63.10 with SMTP id z10mr1660150vch.210.1275168429362; Sat, 29 May 2010 14:27:09 -0700 (PDT) Sender: grettke@gmail.com Received: by 10.220.170.200 with HTTP; Sat, 29 May 2010 14:27:09 -0700 (PDT) In-Reply-To: <201002161808.21283.jon@ffconsultancy.com> References: <756daca51002160847k1a416f01p36cc192d00e25697@mail.gmail.com> <201002161808.21283.jon@ffconsultancy.com> Date: Sat, 29 May 2010 16:27:09 -0500 X-Google-Sender-Auth: hPW_3fjB5tZ7N8zr9ZGoqrWlN2c Message-ID: Subject: Re: WAS Re: [Caml-list] Re: The need to specify 'rec' in a recursive function defintion From: Grant Rettke To: Jon Harrop Cc: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; recursive:01 defintion:01 compiler:01 compiler:01 1975:98 wrote:01 wrote:01 rec:01 rec:01 recursively:01 caml-list:01 define:02 philosophy:02 resolving:03 let:03 On Tue, Feb 16, 2010 at 1:08 PM, Jon Harrop wrote: > 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. It wasn't about the "burden" of having to type 4 extra characters; rather I was trying to understand the philosophy behind the langguage.