David L. Nicol wrote:
>
> What if "try" were implied by the appearance of "catch" keywords,
> which expire at the close of their block?
>
> Would someone please enlighten me as to the purpose of an explicit
> "try."
The "try" is not necessarily for Perl's sake. It's for the
programmer's sake. It says, watch out, some sort of non-local
flow control may be going on here. It signals intent to deal
with action at a distance (unwinding semantics).
I don't think we should obfuscate classic try/throw/catch/finally
from the ground up. Humans have to read this code too. When I'm
using non-local flow control to implement error handling, I very
much want the try, catch, and finally keywords to stand out from
non-unwinding-semantics control structures, so I have some chance
of getting the logic right, every time.
Yours, &c, Tony Olekshy