3 ms·
> the left-hand side of the assignment is completely irrelevant to the if statement I guess is subjective? To me, that's the first thing I want to know about a
by mehrdadn 8y ago
> the left-hand side of the assignment is completely irrelevant to the if statement
I guess is subjective? To me, that's the first thing I want to know about an assignment -- what is being assigned to? Especially if you try to keep your programs reasonably functional, then it's in fact the thing that matters, since the right-hand side would be side-effect-free.
Another way I see it is that an assignment expression is like solving a problem: first you'd ask "what did they solve for?", then you ask "how did they solve for it?" -- not the other way around.