develooper Front page | perl.perl5.porters | Postings from May 2012

Re: [perl #108286] Wishlist: Overridable keywords

Thread Previous
From:
Eric Brine
Date:
May 15, 2012 09:55
Subject:
Re: [perl #108286] Wishlist: Overridable keywords
Message ID:
CALJW-qESYJF6DLPYhWKkLd8P2trWdHJXrgNQ_PyA-afrdY0X1g@mail.gmail.com
On Tue, May 15, 2012 at 1:06 AM, Father Chrysostomos via RT <
perlbug-followup@perl.org> wrote:

>  Given an mistake as easy to make as this:
>
>    if($foo) { };
>    else { $bar }
>
> do you think it is acceptable for
>
>    syntax error at - line 2, near "else"
>    Execution of - aborted due to compilation errors.
>
> to become
>
> Can't call method "else" on an undefined value at - line 2.
>
> ?
>
> Maybe it is.
>

ARGH! Indirect method call syntax bites again. Endless source of poor error
messages. How I hate thee.

The alternative is for "else" to remain a reserved word instead of a
keyword. Your prior questions indicate this would make things a bit messier
than ideal, but that's about all. You know better whether that's acceptable
or not.

- Eric


Thread Previous


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