Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
HeyLaughingBoy
on Nov 25, 2020
|
parent
|
context
|
favorite
| on:
That’s not why I did it
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 ==
MauranKilom
on Nov 25, 2020
|
next
[–]
Commonly called "Yoda conditions":
https://en.wikipedia.org/wiki/Yoda_conditions
zentiggr
on Nov 25, 2020
|
prev
[–]
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: