News for hackers. Stuff that matters.
Re:Shipping Culture Is Hurting Us by thinkling on Tuesday February 17, 2015 @03:20AM (#9061156)
I think the author just picked an awkward example. The real point is the existence of that table of weird (non)equalities and (non)truthinesses in JS [1].

[1] https://dorey.github.io/JavaScript-Equality-Table/

Re:Shipping Culture Is Hurting Us by flomo on Tuesday February 17, 2015 @04:41AM (#9061370)
I cracked up over the famous NaNNaNNaNNaN Batman presentation. But, IMO that table is very predictable for a 'dynamic' language, for the normal use-cases. It only gets strange on the outer edges with oddball arrays and objects.

But, if you have code which compares one-element arrays with strings, you have bigger problems than javascript. I can't recall seeing any serious comparison Batman-style bug. Hypothetically, that kind of stuff wouldn't even be a logic bug, but a design issue that was allowed by the dynamic type system. Solution: don't bitch about Javascript, use something else.