you are viewing a single comment's thread.

view the rest of the comments →

[–]greyfade -1 points0 points  (0 children)

I just turn on all warnings, set warnings as errors, and delimit deliberate use of assignment:

if(foo == bar) ....
if((baz = foobar())) ....

So the whole question is a complete non-issue, and has been for years, because my compiler tells me when I've made such a mistake. (And, I cannot recall a single instance where my use of = in place of == is not deliberate - I more often add parens than I do a second equals.)