develooper Front page | perl.perl6.language | Postings from February 2001

End-of-scope actions: do/eval duality.

Thread Previous | Thread Next
From:
Tony Olekshy
Date:
February 12, 2001 12:59
Subject:
End-of-scope actions: do/eval duality.
Message ID:
3A884EB2.9A18CC7F@avrasoft.com
John Porter wrote:
> 
> There is no try, there is only do. :-)

Nonsense.

Traditionally Perl has had both the "do" and the "eval" block
forms, the latter which traps, the former which doesn't.

"try" is just a slightly souped-up "eval" that better handles the
class of problems introduced when exceptions are more commonly
used for error handling (by adding some well-defined auxiliary
clauses to the statement).

Perl has always used an in-flow statement (namely "eval") to signal
an unwind-trapping context; are you *sure* you want to change that
tradition now?

If we work together on this we can make Perl 6's exception handling
something worth having worked on.  If we throw a bunch of untested
ideas together we can only hope they work (at least I hope they work,
since Perl has been my favourite language for the last twelve years).

Now, shall we?

Yours, &c, Tony Olekshy

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About