> 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.
Stefan
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman
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 t
>>> 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 featu
>> 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.
>>
> It sure does, tho not with "fun" but only with "var" definitions.
^^^
val
Stefan "blush!"
___
Caml-list mailing list. Subscription management:
On Wed, Feb 10, 2010 at 5:01 PM, Stefan Monnier
wrote:
>> 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; it is
very convenient t
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
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
>
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 t
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?
Considering
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 eve
>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
Archiv
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 th
On Wed, Feb 17, 2010 at 12:09 PM, Andrej Bauer 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 language feature
14 matches
Mail list logo