>>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:
DS> I'd rather not store the iterator in the optree or, if we do, make
DS> it lexically scoped. I'd actually *really* like to make iterators
DS> explicit objects all by themselves, but it's too much work for
DS> most uses of iterators...
that brings up a thought. most (%90+ ?) cases hash iteration would work
fine with the setup we have now. so leave it as is. but for the coder
who needs finer control, let them have explicit iterator objects. we can
even make those objects iterate over other stuff as well (like some
other languages support).
now we still have the problem of designing a clean iterator object that
will work with perl hashes. the usual questions arise: what happens if
you modify the hash during the iteration? where is the state of
iteration stored (in the object most likely)? how can the iterator state
be accessed/managed?
uri
--
Uri Guttman --------- [EMAIL PROTECTED] ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com