Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Help me find this pdf
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-10-18 (14:22)
From: Brian Hurt <bhurt@j...>
Subject: Re: [Caml-list] Help me find this pdf
Jon Harrop wrote:

>On Thursday 18 October 2007 13:46:10 you wrote:
>>From: Jon Harrop <>
>>>Scala can do something similar by controlling evaluation simply by
>>>altering the signature. However, I've reviewed Haskell recently and I
>>>think complete laziness is more of a hindrance than a benefit. The only
>>>think I'd like to see added to eager FPLs is the ability to pattern match
>>>over lazy values, forcing them only when necessary.
>>What! You want Caml V3.1 (released in 1991 IIRC)!
>>I remember writing a lazy prolog interpreter using this feature.
>>Lazyness in ocaml works too, but it's more verbose.
>How do you pattern match over lazy values in OCaml? If I've missed that, it 
>would be really cool to find out! :-)
You have to explicitly force the lazy value first- but other than it 
being explicit, this is no different from other languages that 
implicitly force the value for you.  Well, Haskell has an option where a 
pattern match can always succeed that doesn't necessarily force the lazy 
value (I forget what it's called at the moment), but baring that, even 
standard Haskell pattern matching forces the value for the match.