caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
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	[thread overview]
Message-ID: <201002161808.21283.jon@ffconsultancy.com> (raw)
In-Reply-To: <756daca51002160847k1a416f01p36cc192d00e25697@mail.gmail.com>

On Tuesday 16 February 2010 16:47:03 Grant Rettke wrote:
> On Tue, Feb 16, 2010 at 10:21 AM, Ashish Agarwal <agarwal1975@gmail.com> 
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


  reply	other threads:[~2010-02-16 16:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-16 16:47 Grant Rettke
2010-02-16 18:08 ` Jon Harrop [this message]
2010-02-17 17:09   ` Andrej Bauer
2010-05-29 21:27     ` Grant Rettke
2010-05-29 21:27   ` Grant Rettke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201002161808.21283.jon@ffconsultancy.com \
    --to=jon@ffconsultancy.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).