2 ms·
"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 i
by yannickt 10y ago
"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.