Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I agree that triple equals is an abomination. It's one of the many things ensuring I use JavaScript as little as possible.


You can pretty much ignore mostly anyone most of the time who screeches at you to use triple equals (strict equality comparison) instead of regular ol' "==" (abstract equality comparison). It's one of modern programming's dumbest, least well-founded memes, resulting in such brilliant advice as insisting during code review that

  typeof(foo) == 'string'
be changed to

  typeof(foo) === 'string'
because the latter is "safer". Anyone saying—anyone—this is guaranteed not to know what the hell they're talking about—and shouldn't be in a position where they're pretending that they do. It's unjustifiable and pure cargo cultism.


A well designed language should not have an equals that results in a cargo cult


I have missed the part of the discussion that contains an imperative for folks to debate the resolution of whether JS is a "well designed language"—and not about JS's equality comparisons per se and whether it's still usable or not despite that. These:

> JavaScript equals is an abomination, which to me seems like a larger issue, and people use it just fine.

... are your own words...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: