r/badcode • • Nov 22 '19

c# It doesn't even do it right!

Post image
1.1k Upvotes

59 comments sorted by

View all comments

Show parent comments

40

u/spicenozzle Nov 22 '19

Which style guides would do that? That seems so bizarre and obfuscatory.

15

u/phord Nov 22 '19

I personally loathe it.

done = triggered != false is terrible code.

8

u/ikatono Nov 22 '19

I understand not comparing against boolean literals, but A == B is just XNOR.

4

u/phord Nov 23 '19

Sure. No complaints about that.