Carlos
10/6/2006 2:34:00 PM
Martin Coxall wrote:
> On 10/6/06, Carlos <angus@quovadis.com.ar> wrote:
>
>> Phrogz wrote:
>> [...]
>> > Now, I would consider it a valid argument to say "Let's not codify a
>> > particular interpetation of some syntax that conflicts with another
>> > reasonable interpretation, because it will be surprising to a notable
>> > percentage of programmers." Would anyone say that they personally have
>> > a different expectation for what "a,b += x,y" might mean?
>>
>> "The same as
>> a,b = a,b + x,y
>> but with a,b evaluated only once"?
>>
>
> Well quite, which is a syntax error, obviously, because there are
> three rvalues and only two lvalues.
It doesn't matter ( a,b = 1,2,3; p a,b #=> 1\n2 ). But unless
(a,b) OP (c,d)
does
a OP c; b OP d
(it currently doesn't and it's a syntax error) we lose a nice, simple
and general explanation of what
x OP= y
does.
>
> Which kind of demonstrates how the Law of Unintended Consequences can
> flummox even the most sickly of synactic sugars.
>
> Martin
--