|
|
| Welcome to the Monastery | |
| PerlMonks |
Re^3: what would you like to see in perl5.12?by Corion (Pope) |
| on Aug 20, 2007 at 15:36 UTC ( #633851=note: print w/ replies, xml ) | Need Help?? |
|
I think that upto(...) returns an iterator/generator. The example I used is fairly trivial to reimplement in Perl5 now already:
Iterators/generators allow you to conveniently program in a linear fashion without needing to maintain the state. For example this contrived example is far easier to write in a linear fashion than it is in a closure fashion, because you need to store the current point of execution:
I'm aware that all my wishes are possible in principle now already, but either slow or burdened with ugly syntax. Which is why I wish for them to become less burdened and faster.
In Section
Meditations
|
|
||||||||||||||||||||||