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 (13:26)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] Help me find this pdf
On Thursday 18 October 2007 13:40:43 Arnaud Spiwack wrote:
> > 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.
> Which might simply need to have a support for views, wouldn't it ?

Yes. F# provides pattern matching over lazy lists using exactly that technique 
and views are more generally useful when dissecting data structures held in 
foreign formats without copying them.

However, implementing views is probably a lot harder than just implementing 
pattern matching over lazy values. I suspect pattern matching over lazy 
values could be implemented much more efficiently that the more general case 
of views.

Dr Jon D Harrop, Flying Frog Consultancy Ltd.