|
|
|
|
|
by LionessLover
3681 days ago
|
|
In addition to the reply with the pointer to the standards, sure NaN !== NaN. NaN means "no idea what we've got here". When you get to say that phrase, would you expect it to be used for exactly one thing and one thing only? To me "I have no idea" means the possibilities are endless (infinite). We can only compare for equality when we know what we are looking at, otherwise it's just "status unknown". Yes, it might be equality - the chances are infinitely small though. If you take the argument a step further and say "but I got the two NaNs that I compare doing the exact same operation, so even if I don't know what I've got from a mathematical point of view whatever it is it should be equal". In that case you are not actually comparing the NaNs but the path(s) that got you there. I must say I find the whole NaN, null, 0 vs. undefined interesting on so many levels. There is a world of a difference between knowing you've got nothing (null or 0) and not knowing what've you've got at all. "null": I have no bank account. "0": my balance is 0. "undefined" or "NaN": I lost my memory after yesterdays binge drinking and don't know who I am and if I got a bank account or not. Knowledge vs. no knowledge. |
|
The joke was, of course, surrounding the Mozilla incedent where Brendan Eich stepped down from his position as CEO apparently because of a perception that he was promoting inequality. This characterization was due to his support of prop 8 (a bill about marriage equality, or lake there of).
To completely ruin the joke's punchline[1], was that the "problems he had with equality" were actually his understanding of types and language development and are evident in javascript.
Of course that is untrue, was a joke, and Brendan Eich is a legendary programmer whose contributions I am grateful for.
[1] Joke's punchline could be ruined by it being both a bad joke needing an explanation, being in poor taste, and generally just not being a funny joke.