At 12:50 PM 8/24/00 -0500, Jonathan Scott Duff wrote:
> > 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.
>
>map is a slightly different animal because the block comes first.

No, I'm talking about the other form of map:  "map EXPR, LIST" which 
requires a comma.

> > 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.
>
>Not necessarily.
>
>         catch { EXPR } { ... }          # probably not going to work though
>         catch (EXPR) { ... }            # this will work
>         catch do { EXPR } { ... }       # this will work

Um, granted, but if you're going to need additional syntax around your EXPR 
to disambiguate it then => seems as good as any and it has that neat "this 
thing causes this thing" interpretation.

--
Peter Scott
Pacific Systems Design Technologies

Reply via email to