[EMAIL PROTECTED] writes:
: --- Larry Wall <[EMAIL PROTECTED]> wrote:
: > Simon Cozens writes:
: > : Larry Wall:
: > : > 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>.  
: > : 
: > : Doesn't this break C and Shell resonance?
: > 
: > We've done that before.  :-)
: 
: Umm, doesn't break translate basically as "leave, now" rather than as
: "hop to the loop nexus and consider leaving"?

Sure, but it means "leave the switch now", not "leave the loop now".

: What's your thinking in equating break w/ next?

Only that

    for @foo {
        ...
    }

can be thought of as shorthand for

    for @foo -> $temp {
        given $temp {
            ...
        }
    }

I am also assuming that the break is only meaningful as a switch control,
not a loop control.  But I can see where it would be confusing.  Perhaps
C<break> should be illegal inside a C<for>, and the user forced to choose
between C<next> and C<last>.

Larry

Reply via email to