3 ms·
Using "if myvar is 0" exposes you to more implementation dependent behavior than "if myvar".
by maxerickson 15y ago
Using "if myvar is 0" exposes you to more implementation dependent behavior than "if myvar".
- toyg 15y agoI 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.