Front page | perl.perl6.language |
Postings from May 2005
From: Rob Kinyon
May 26, 2005 06:04
Message ID: firstname.lastname@example.org
> Is giving "=" a higher precedence than "," still considered A Good Thing?
> I'm not familiar with the reasoning behind the current situation, but
> I'm struggling to come up with any good reasons for keeping it.
> Consider the alternative:
> my $a, $b = 1, 2; # $b should contain 2, not 1
I read this as
(my $a), ($b=1), 2;
The comma separates clauses in English (and other languages). Why
should it not be so in Perl?
If you need parens, then use them. I believe it was Larry who said
"When in doubt, parenthesize. At the very least, people can bounce on
them with % in vi."