Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

At one job I had, our programming standards dictated that we would have to write "if (false == foo)" to account for the case where someone accidentally types = instead of ==


Commonly called "Yoda conditions":

https://en.wikipedia.org/wiki/Yoda_conditions


That's not rare, anyway... unless the linter can flag == <bool>, and suggest fixes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: