Front page | perl.perl6.language |
Postings from May 2005
From: Stuart Cook
May 25, 2005 20:50
Message ID: email@example.com
On 5/26/05, Juerd <firstname.lastname@example.org> wrote:
> You could, if you changed the precedence of , to be tighter than =.
> However, by default, = has higher precedence than ,, so that you need
> parens to override this decision: @a = (1,2,3);
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
my @foo = 3, 4, 5; # @foo should contain (3, 4, 5), not (list 3)
What justification for the status quo could be so compelling that we
feel the need to prevent both of these from doing the 'natural' thing?