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

"If this was C, it should be NULL, and it is almost always better to just write `if (variable)` to check for NULL pointers instead."

Imagine that it was this instead:

  if (5 != variable)
As the author points out, this was typically used by C and C++ developers to prevent accidental assignments inside conditional statements.


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

Search: