Re:Why C++ is vastly superior to C
by spullara on Saturday May 14, 2011 @12:29PM
(#2547954)
In most dynamic languages 0 is false and anything else is true but it normally wouldn't use that information to coerce two values of different types to booleans before comparing them.
[ Parent
| on HN ]
I'm only aware of php and javascript equating 0 to false. But at any rate in this case it's not equating 0 to false, it's comparing non-zero to zero and returning true. (as it should)
Re:Why C++ is vastly superior to C
by burgerbrain on Saturday May 14, 2011 @01:12PM
(#2548065)
In C, 0 evaluates to false.