Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Things I Was Wrong About: Types. Parent comment
That said, after ten years of use, I still see something like:
function_returning_false_or_int() > -1
Now, nobody should write that shit in the first place, but turns out it’s equivalent to ‘!== false’.
‘(int)false’ is zero, but ‘false > -1’... is not true.
There are no comments on this comment yet.
That said, after ten years of use, I still see something like:
And sometimes have the wrong intuition about what it does.Now, nobody should write that shit in the first place, but turns out it’s equivalent to ‘!== false’.
‘(int)false’ is zero, but ‘false > -1’... is not true.