>>>>> "AS" == Ariel Scolnicov <[EMAIL PROTECTED]> writes:
AS> Chaim Frenkel <[EMAIL PROTECTED]> writes:
>> yield EXPR - stop what I am doing now and give something else a
>> a chance to do its things. And while you are doing
>> that please take this EXPR from me.
AS> When you put it this way, isn't C<yield> spelled C<return> in Perl5?
AS> (Except, of course, that C<return> inside a C<grep> does a whole lot
AS> more nowadays).
Err, no. return is much stronger. It goes to the caller of the sub.
Yield would be relative to a much tighter scope.
I think Randal would reject this, but if we make it an error to
have a last/next/redo reach outside of a visible lexical scope, then
last,next,redo would be 'weakest', followed by yield, return, die
(and whatever is used for exceptions.)
<chaim>
--
Chaim Frenkel Nonlinear Knowledge, Inc.
[EMAIL PROTECTED] +1-718-236-0183