From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q03D5wed022856 for ; Tue, 3 Jan 2012 14:05:58 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsESAM77Ak8macht/2dsb2JhbABDggWeO4wYCIEFgXIBAQEDARICLAEBNwEECwsEAQYCOSEBEgEFARwGEyKHWJhPCoozhB0BjVUHjA+IO4xLhW+FAIMOPYQY X-IronPort-AV: E=Sophos;i="4.71,450,1320620400"; d="scan'208";a="137656116" Received: from unknown (HELO mxgoog1.janestreet.com) ([38.105.200.109]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 03 Jan 2012 14:05:41 +0100 Received: from mail-tul01m020-f170.google.com ([209.85.214.170]) by mxgoog1.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1Ri43f-0005eQ-6C for caml-list@inria.fr; Tue, 03 Jan 2012 08:05:39 -0500 Received: by obcwo10 with SMTP id wo10so13292809obc.29 for ; Tue, 03 Jan 2012 05:05:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=ia+FCFA46QOKonvZa+xQaRoVa5w+nLpNu6dsLitFoLc=; b=hZ56ikrM7O6c0zxodMd4TLvzZfam2G1lGVu48fttE1nwHy25L1eFUa3OKFKmGS9Z8m 40SPZ8tH2sjGyyFq8JHtfVpOEviWt6cFQeSZ4yOZSXjm/5RuCAzVAELEqdMbCcPedRJm yfp0rqnbIxne4aWcxikhEUMJ2nZZGtHIaISX8= MIME-Version: 1.0 Received: by 10.182.13.105 with SMTP id g9mr44760126obc.63.1325595938577; Tue, 03 Jan 2012 05:05:38 -0800 (PST) Received: by 10.182.11.167 with HTTP; Tue, 3 Jan 2012 05:05:37 -0800 (PST) X-Originating-IP: [166.137.137.12] Received: by 10.182.11.167 with HTTP; Tue, 3 Jan 2012 05:05:37 -0800 (PST) In-Reply-To: References: Date: Tue, 3 Jan 2012 08:05:37 -0500 Message-ID: From: Yaron Minsky To: Diego Olivier Fernandez Pons Cc: caml-list Content-Type: multipart/alternative; boundary=f46d044285f208dca904b59f5b77 Subject: Re: [Caml-list] Examples where let rec is undesirable --f46d044285f208dca904b59f5b77 Content-Type: text/plain; charset=ISO-8859-1 For what it's worth, my feeling is that even if there weren't technical reasons to require the "rec'' marking for recursive functions, I would want it as a language feature. Recursive definitions are harder to understand than non recursive ones, and it's helpful to have the static guarantee that only definitions so marked will be allowed to refer to themselves. This makes it hard to mistakenly refer to yourself, which I think is a real source of error. y On Jan 2, 2012 5:38 PM, "Diego Olivier Fernandez Pons" wrote: > List, > > I was wondering if there was any reason not to make "let rec" the default > / sole option, meaning cases where you clearly don't want a "let rec" > instead of "let" (only in functions, not cyclic data). > > Diego Olivier > --f46d044285f208dca904b59f5b77 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

For what it's worth, my feeling is that even if there weren't te= chnical reasons to require the "rec'' marking for recursive fu= nctions, I would want it as a language feature.=A0 Recursive definitions ar= e harder to understand than non recursive ones, and it's helpful to hav= e the static guarantee that only definitions so marked will be allowed to r= efer to themselves.=A0 This makes it hard to mistakenly refer to yourself, = which I think is a real source of error.

y

On Jan 2, 2012 5:38 PM, "Diego Olivier Fern= andez Pons" <dofp.ocaml@gma= il.com> wrote: