Re: RFC 88 (v2) Omnibus Structured Exception/Error Handling Mechanism
[email protected] (Peter Scott) Thu, 24 Aug 2000 10:10:49 -0700
| Newsgroups | perl.perl6.language.errors |
|---|---|
| Message-ID | <[email protected]> |
At 12:07 PM 8/24/00 -0500, Jonathan Scott Duff wrote:
> > catch Alarm => { ... }
> > catch Alarm, Error => { ... }
> > catch $@ =~ /divide by 0/ => { ... }
>
>The => here seems like useless syntax to me.
Au contraire... it emerged from our discussion of this case:
> catch EXPR { ... }
How should the parser disambiguate
my ($hash,%hash);
try { ... } catch $hash { ... }
? But if we require the comma, we know it's parseable, because map can do it.
But I initially wanted to do without the => ... unfortunately that would
require another keyword to handle the EXPR case and it didn't seem worth it.
--
Peter Scott
Pacific Systems Design Technologies