Re: WAS Re: [Caml-list] Re: The need to specify 'rec' in a recursive function defintion

2010-05-29 Thread Grant Rettke
On Tue, Feb 16, 2010 at 1:08 PM, Jon Harrop j...@ffconsultancy.com wrote: On Tuesday 16 February 2010 16:47:03 Grant Rettke wrote: On Tue, Feb 16, 2010 at 10:21 AM, Ashish Agarwal agarwal1...@gmail.com wrote: let rec Do OCaml'er look at let rec more as being a message to the programmer,

Re: WAS Re: [Caml-list] Re: The need to specify 'rec' in a recursive function defintion

2010-05-29 Thread Grant Rettke
On Wed, Feb 17, 2010 at 12:09 PM, Andrej Bauer andrej.ba...@andrej.com wrote: Moreover, the burden of rec is tiny so I don't think it is worth discussing in such detail. Ah, but you are forgetting Wadler's Law. You mean this: Wadler's Law: The emotional intensity of debate on a

Re: WAS Re: [Caml-list] Re: The need to specify 'rec' in a recursive function defintion

2010-02-17 Thread Andrej Bauer
Moreover, the burden of rec is tiny so I don't think it is worth discussing in such detail. Ah, but you are forgetting Wadler's Law. ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives:

[Caml-list] Re: The need to specify 'rec' in a recursive function defintion

2010-02-16 Thread Stefan Monnier
It sure does, tho not with fun but only with var definitions. ^^^ val Stefan blush! ___ Caml-list mailing list. Subscription management:

Re: [Caml-list] Re: The need to specify 'rec' in a recursive function defintion

2010-02-16 Thread Ashish Agarwal
It may be worth recalling the OCaml koans at http://eigenclass.org/hiki/fp-ocaml-koans. The first one is: let rec One day, a disciple of another sect came to Xavier Leroy and said mockingly: The OCaml compiler seems very limited: why do you have to indicate when a function is recursive, cannot

WAS Re: [Caml-list] Re: The need to specify 'rec' in a recursive function defintion

2010-02-16 Thread Grant Rettke
On Tue, Feb 16, 2010 at 10:21 AM, Ashish Agarwal agarwal1...@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

Re: WAS Re: [Caml-list] Re: The need to specify 'rec' in a recursive function defintion

2010-02-16 Thread Jon Harrop
On Tuesday 16 February 2010 16:47:03 Grant Rettke wrote: On Tue, Feb 16, 2010 at 10:21 AM, Ashish Agarwal agarwal1...@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

[Caml-list] Re: The need to specify 'rec' in a recursive function defintion

2010-02-15 Thread Stefan Monnier
Wouldn't one of way of detecting a recursive function would be to see if the indeed the function calls itself? That's what Haskell does, yes. Let's make things clear here: the rec *really* is a feature; Nobody said otherwise. Eliminating the rec is also a feature. Those two features are

Re: [Caml-list] Re: The need to specify 'rec' in a recursive function defintion

2010-02-15 Thread Jon Harrop
On Monday 15 February 2010 15:46:58 Stefan Monnier wrote: Till Varoquaux had written: Let's make things clear here: the rec *really* is a feature; Nobody said otherwise. Eliminating the rec is also a feature. Those two features are mostly incompatible, and many reasonable people disagree

[Caml-list] Re: The need to specify 'rec' in a recursive function defintion

2010-02-15 Thread Stefan Monnier
Till Varoquaux had written: Let's make things clear here: the rec *really* is a feature; Nobody said otherwise. Eliminating the rec is also a feature. Those two features are mostly incompatible, and many reasonable people disagree on which one of the two is more important. Stefan who

Re: [Caml-list] Re: The need to specify 'rec' in a recursive function defintion

2010-02-10 Thread Jon Harrop
On Wednesday 10 February 2010 22:25:44 Till Varoquaux wrote: Some (including me) would even argue that it is sad that type definitions don't use rec. Agreed. Less useful than rec on function definitions but that would still be useful sometimes. -- Dr Jon Harrop, Flying Frog Consultancy Ltd.

[Caml-list] Re: The need to specify 'rec' in a recursive function defintion

2010-02-10 Thread oleg
Fortunately OCaml is (much more) than simply-typed lambda calculus. Almost any feature of OCaml -- recursive data types, recursive types, reference cells, mutable records, exceptions, objects, recursive modules and polymorphic variants -- can be used to express the fixpoint combinator. Sometimes