|
|
|
|
|
by bch
2966 days ago
|
|
And consider “Yoda Notation”[0], which some people find annoying, but I found an easy hurdle to clear: if ( 3 = DEBUGLEVEL )
wouldn’t pass the the parser because you can’t assign to an rvalue.[0] https://en.wikipedia.org/wiki/Yoda_conditions |
|
Furthermore any decent modern compiler will warn you and ask to add an extra set of parens around assignments in conditions so I don't really think it's worth it anymore. And of course it won't save you if you're comparing two variables (while the warning will).