in reply to Re: The Virtue of Laziness
in thread The Virtue of Laziness

> If you want lazy evaluation in general, I think it's unlikely you'll ever get that in Perl.

Not sure what is meant with "in general"

Changing all map and grep to lazy would most certainly cause problems with old code which relies on the time the elements of the list are evaluated.

One would need new commands like lmap (lazy) or igrep (iterator) to implement this.

I did a POC once with iterators, problem was the performance of those iterators after the third loop level was abysmal.

And there are dragons concerning evaluation timing.

Not sure if the model in Haskell or Python should be considered canonic.

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery