Hacker News new | ask | show | jobs
by amelius 2209 days ago
Well, the situation is even trickier:

   (a, b) = (10, 20)
is allowed code in C++ (not in C). The result is that 20 is assigned to b, and a is untouched.

Contrast this to:

    a, b = 10, 20
where (as above) 10 is assigned to b and a is left untouched, because it is parsed as:

    a, (b = 10), 20
and I hope you agree that the behavior is very confusing.