Why do some experienced programmers write comparisons with the value before the variable? [duplicate]

That used to be the case, yes. Of course, nowadays almost all compilers warn about assignments in if() conditions, so the advantage is only there for people who routinely suppress warnings.

Leave a Comment