Larry Wall wrote:
> We do have to worry about the C<next> loop control function though.
> It's possible that in
> 
>     FOO: while (1) {
>       next FOO if /foo/;
>       ...
>     }
> 
> the C<FOO> label is actually being recognized as a pseudo-package
> name!  The loop could well be an object whose full name is C<MY::FOO>.
> Or something like that.  But maybe that's a gross hack.  Seems a bit
> odd to overload C<next> like that.  Maybe we need a different word.

Pardon me if someone has already suggested this, but...
Couldn't labels really be (aliases to) iterator objects?
So that
        next FOO
really *does* mean
        FOO.next

-- 
John Porter

All men are subjects.

Reply via email to