Browse thread
Help me find this pdf
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| 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. http://www.ffconsultancy.com/products/?e