In message <[EMAIL PROTECTED]>
Perl6 RFC Librarian <[EMAIL PROTECTED]> wrote:
> =head1 MIGRATION ISSUES
>
> Minimal. No-one nests iterators now because it doesn't work.
Indeed. It is just concievable though that somebody might write
each more than once as part of a single iteration - something like
this:
($k,$v) = each %h;
while (...)
{
...
($k,$v) = each %h;
}
Is it going to be possible to come up with a way of translating that
code? or are we prepared to accept that code like that will fail to
translate automatically?
That by the way is the only reason that I didn't suggest this change
as part of RFC 136.
> Would not (necessarily) have an effect on the use of FIRSTKEY and NEXTkey
> in tied hashes, since the compiler could still determine which should be
> called. However, tied hashes that use an internal cursor might behave
> differently, if nested.
See RFC 136 for some thoughts on how this issue can be resolved when
multiple iterators are needed.
Tom
--
Tom Hughes ([EMAIL PROTECTED])
http://www.compton.nu/
...The early worm gets the bird.