by Falling3 · 9y ago · 0 comments
I find it perfectly natural to read "if 5 == x:" without having to flip it around.
(And it's not about "cognitive load" on the compiler, it's about fail to error not fail to silent success.)
I'm quite happy that all the languages I use regularly disallow assignment in ifs, at least.
So no, even including side effects testing for (in)equality is commutative.
I haven't written anything in C in quite a while, and completely forgot about inline assignments. Which brings me to another pet peeve of mine, inline assignments... ;-)