David L. Nicol wrote:
> 
> This ability to jump to "the right place" is exactly what exception handling
> is for, as I understand it.  Exceptions allow us to have one kind of block
> and any number of kinds of exit mechanisms. If qC(last die return) are all
> excpetions, the can travel up the call stack until they find the appropriate handler.

Kinda.  "Exceptions" are supposed to be for exceptional situations only; return is 
none such.  last/next/redo isn't really, either.  And I strongly oppose having perl
handle user-raised exceptions.  But the "longjump" idea is right; so I propose
that we lump these things together not as "exceptions" (though they may be
implemented internally that way), but as "jumps".

But I think the point is important, that the various kinds of blocks, and
their respective, yea, defining, exit mechanisms, not be confused or conflated.
We just need to clear up what kind of block grep/map use: either a true
sub (which I favor), or a distinct kind, with its own early exit keyword(s).

-- 
John Porter

        We're building the house of the future together.

Reply via email to