develooper Front page | perl.perl5.porters | Postings from November 2009

Re: "If" your subscript goes bump in the night

Thread Previous | Thread Next
From:
Tom Christiansen
Date:
November 2, 2009 07:21
Subject:
Re: "If" your subscript goes bump in the night
Message ID:
28523.1257175245@chthon
Zefram wrote:

>David Nicol wrote:

>> could the expression parsing rules change following an if or
>> unless or while or until but nowhere else

> The last thing the Perl grammar needs is *another* set of subtly-
> different parsing rules for different situations.  Especially
> whitespace-sensitive ones, and especially ones involving
> braces.  I'd *much* rather just keep mandatory parens.

My gut reaction is the same as yours.  What you describe gives me 
a flutter in the stomach.  The convenience to some doesn't justify
the added complexity.  Conditional white-space sensitivity seems
to invite derision, not celebration.

I also realize that my gut isn't a good predictor for what goes 
into Perl.  We got "//" even though it's not needed.  And we got 
"and", "or", and "not" (and "err"--sigh) specifically as a way 
o skip parentheses, even though I find code easier to read when
it has punctuation to guide my eye, not words that sink into 
the general texture of function calls.

Larry obviously feels otherwise.  See Rule 1.

--tom

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