33

coding style - Doesn't "if (0 == value) ..." do more harm than...

 5 years ago
source link: https://softwareengineering.stackexchange.com/questions/16908/doesnt-if-0-value-do-more-harm-than-good/16997#16997
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
This is one of the things that I hate most when I see it in someone else's code. I know what it means and why some people do it this way ("what if I accidentally put '=' instead?"). For me it's ver...

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK