Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
maxerickson
on April 28, 2012
|
parent
|
context
|
favorite
| on:
An employee, whose last name is Null, kills our em...
Using "if myvar is 0" exposes you to more implementation dependent behavior than "if myvar".
toyg
on April 28, 2012
[–]
I agree, but it's still more explicit in terms of what process is used to evaluate the content of myvar and what it should match, especially in a context where you're expecting a numeric value rather than a boolean.
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: