3 ms·
It may not be completely fair but the critics do themselves no favors by using the same tired arguments from that camp over and over.
by abritinthebay 9y ago
It may not be completely fair but the critics do themselves no favors by using the same tired arguments from that camp over and over.
- saghm 9y agoI think there are a number things fairly unique to JavaScript (i.e. not present in other dynamic languages) that garner a certain amount of criticism even from fans of other dynamic languages. Type-independent equality (`==` rather then `===`), prototypical rather than class-based OO, and context-based meaning of `this`, among other things, get a decent amount of criticism, and you wouldn't run into the same issues in Python or Ruby, for instance. (Not trying a make a value judgment here about those aspects of JavaScript, just making a point that some of the criticism of JavaScript is specific to the language itself and not to dynamic languages in general).
- abritinthebay 9y agoIdentity vs Equality isn’t unique to JS. It’s particular syntax isn’t even unique either (though less common). Protypical inheritance goes back to the damn Actor pattern and modern versions (like JS) derive from Smalltalk. The particular implementation of this in JS is idiosyncratic to JS but not conceptually unique. They improved it a LOT with strict mode too. I swear, most JS criticism on HN seems to sound like developers who only know C++/Java/Ruby/Python critiquing stuff that comes from the Lisp/ALGOL/Smalltalk idioms and not understanding that the way they are used to isn’t the One True way.
- saghm 9y agoI think framing JavaScript's equality semantics as merely "identity vs. equality" glosses over the issue people have with it, namely that the semantics of equality themselves are somewhat inconsistent (e.g. `3 == "3" => true, `3 == "3 "` => true, `"3" == "3 "` => false, or `null > 0` => false, `null == 0` => false, `null >= 0` => true). This isn't to say that these semantics are objectively wrong (although the lack of transitivity in the former does stretch the definition of "equality"), but I don't think it's really that surprising that some programmers aren't fond of them. As for things like prototypical inheritance, `this`, and other language features not being distinct to JS, I'll concede that point. However, I still think my main point stands, namely that criticisms of JS aren't just blanket criticisms of "interpreted languages".