3 ms·
> there just wasn't a compelling reason to keep it over es6 - hiccup syntax / sexps are trees analogous to the HTML you're constantly generating, and first-cla
by pandeiro 10y ago
> there just wasn't a compelling reason to keep it over es6
- hiccup syntax / sexps are trees analogous to the HTML you're constantly generating, and first-class supported data structures supported by the language which need no pre-compilation/transformation step, unlike JSX
- syntax is a good 20-30% less verbose than JS (yes, even ES6), especially when the core lib is taken into account (things like partition, zipmap, threading macros)
- one extremely battle-tested dependency resolution story, not named NPM - it just works
- incredible development tooling innovation, best of class for frontend web development
- the sequence abstraction and dozens of functions that operate on it, rather than Object.assign, Array.map, etc
- best-of-breed dead code elimination via Google Closure Compiler, meaning much of third party libraries and development-specific code ends up weighing less / nothing in production builds
- sets and set operations built in, along with tree walking, diffing and string utility libraries, included with the distribution
- no more defensive copying, thanks to immutability everywhere
- nickbauman 10y ago> one extremely battle-tested dependency resolution story, not named NPM - it just works This alone is worth all of it.
- edem 10y agoYep. Leiningen is even better than mvn/gradle combined.
- glenjamin 10y agoLeiningen uses the exact same dependency resolution model as maven and gradle. It has many advantages over those tools imo - but its dependency resolution model isn't one of them.
- nickbauman 10y agoWhat kind of dependency resolution model would you prefer?
- edem 10y agoDo you have some more info about how should I get started with cljs? I plan to use Polymer and I already have work experience with clj.
- kaoD 10y agoWhat Clojure excels at (expressive data structure walking/manipulation) is, in my experience, seldom used in typical frontend programming, often taken care by underlying frameworks like React. JSX works fine, looks like HTML, and Cljs needs precompilation anyways. Sexps being a pure representation of HTML trees has absolutely zero impact on productivity. I use Closure Compiler, hot reloading and native Sets with regular ES6. I agree that immutability is a must and JS immutable libraries are just not ergonomic. If at least JS had operator overloading... I love Clojure, but it just doesn't click for me in the frontend.