4 ms·
The issue that I find with JavaScript (which I use on a daily basis) is that it has become a "kitchen-sink" language. Every time it gets new additions to "close
by adamkl 7y ago
The issue that I find with JavaScript (which I use on a daily basis) is that it has become a "kitchen-sink" language. Every time it gets new additions to "close the gap" with some other language, it gains more ways to do the same things.
A big thing with Clojure is that it tries to provide a single, idiomatic way of doing things (though overuse of macros may cloud this picture at times). Generally, you can hop into any Clojure codebase and very quickly understand what's what.
Since JavaScript can do just about anything (functional, imperative, object-oriented, prototypical), there's no one "true" way of writing code, so while its possible use the "good parts" of JavaScript, everyone seems to have a different idea of what those are.
Flexibility can be a virtue, but I find myself preferring Clojure due to the constraints it provides.
- hinkley 7y agoDoes anything illustrate this more clearly than the picture of 1e 'Javascript, the Good Parts' sat next to the O'Reilly Javascript book?
- zachrose 7y agoThat image was from a decade ago. The O'Reilly book must be three or four times thicker by now.
- kace91 7y agoAs you say, there is no objective "good parts" of js, what exists is basically a large language that can act as a framework for you to create a language you like by leaving only what you want in the subset allowed by your linters. That's arguably a lot of work, but the payoff is that you get to use your new hand tailored "language" anywhere js can run, which is not the case if you ignore js and just pick a language you like from the get go instead.
- adamkl 7y agoIf you are flying solo, then sure, I can see the appeal, but for most(?) of us, that hand-tailored language needs to be learned by everyone you work with, and anyone who might need to work on your codebase in the future. And it’s unlikely that those future coders will feel the same about your hand-tailored language as you do. (editing to mention the fact that Clojure targets both servers (via JVM/CLR) and browsers (via ClojureScript) so you lose none of the reach you mention with JavaScript)