| The question is funny because on the the list of advantages that Clojurescript offers the syntax / language is quite low on the list imo. Clojurescript has the best client-side build tool I have used in https://shadow-cljs.github.io/docs/UsersGuide.html and everyone uses it. Clojurescript targets/outputs Google Closure compatible code which is easily the most sophisticated JS compiler out there. The reason no one uses it is because writing compatible code by hand is a nightmare. Clojurescript's front end libraries are incredible, they are basically a better expression of Redux because the Clojure language has constructs that enable a more expressive API https://day8.github.io/re-frame/re-frame/ Clojurescript's JS interop is actually insane, boosted by the quality of Shadow-cljs. You can write 1:1 javascript in clojurescript if you need to. A trite example would be npm installing lodash and writing some code that uses it, I have done this and it just works. Clojurescript's developer experience with the browser repl is next level. I know a lot of the stuff I'm saying sounds hyperbolic, but I've written a ton of Javascript and react and I really like it still, but using a browser repl to manipulate application state in my editor and reload functions without a full refresh is great. And I guess lastly, yea the language is awesome. It's basically my perfect version of Javascript. No need to fumble with libraries like immutable.js, no need for additional libraries like ramda or lodash because the standard clojurescript library has everything+. |
This pretty much my view as well. There’s that classic joke comparing two books on JavaScript, the complete language vs. the good parts [0], and you could pretty much just replace the “good parts” book with ClojureScript.
It has everything you need and gets rid of most of the stuff that enables people to write bad code. (Assuming you like functional programming, of course)
[0] https://i.redd.it/h7nt4keyd7oy.jpg