
4 May
2005
4 May
'05
1:17 p.m.
On 5/3/05, Michael Vanier
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...