[Haskell-cafe] Re: Haskell vs OCaml

Quinn Dunkan qdunkan at gmail.com
Wed May 4 13:17:50 EDT 2005


On 5/3/05, Michael Vanier <mvanier at cs.caltech.edu> wrote:
> Lazy evaluation does make some kinds of idioms possible that are much
> harder to do with strict evaluation.  For instance, here is an infinite
> list of ones:

You get something a lot like backtracking automatically by just having
your parser or whatever return a list of all possible results.  It
subsumes "generators" or "iterators" found in other languages in a
much nicer way.

Laziness can make many idioms much more efficient (sometimes so much
so that they go from impossible to possible).  It's not a free lunch
though...


More information about the Haskell-Cafe mailing list