Simon Cozens writes:
: given (...) { 
:     ...
:         break;
:     ...
: }
: 
: for (...) {
:     ...
:         last;
:     ...
: }
: 
: Same concept, different keyword. Good idea?

Not the same concept exactly.  I think a C<break> within a C<for> loop
would be the same as a C<next>, not a C<last>.  So the argument should
be whether to unify C<break> with C<next>.  But I think that would
be confusing, especially to Damian, who originally proposed that C<next>
mean what C<skip> currently means.  :-)

And leaving them separate does allow for people to either "next" or "last"
out of a loop that surrounds a switch.  That loop may not be a C<for>
loop, or there may be extra code before or after the switch, so it's
not a foregone conclusion that the loop and the switch can be unified
anyway.

Larry

Reply via email to