The reason? Lisp based and in spite of the fact it uses cough, Java (JVM), it runs on JavaScript. A better language to run/work with JavaScript. That is a good enough reason to learn and use.
The reason? Lisp based and in spite of the fact it uses cough, Java (JVM), it runs on JavaScript. A better language to run/work with JavaScript. That is a good enough reason to learn and use.
You lose all the good parts of clojure when you go into the js runtime; stm, parallel processing, java interop, hot reloading, and it pulls in some really quite large js dependencies, and it's impossible to debug. Even console logging becomes a case of 'convert to readable object and log' using special helpers.
What's the benefit?
I don't see any meaningful reason to use clojure in this context; what's the draw? Why would you bother over any other compiles-to-js language?
You.. just like the syntax? That's the best answer I've gotten so far.
I'm biased, but I think ClojureScript is the best way to use the JavaScript platform today. Awesome core library, consistent build process, best of breed tooling, persistent data structures, flexible syntax (JSX is madness compared to hiccups); I could go on.
JavaScript the platform may have it's warts, but ClojureScript is all beauty :)
I've been slow to this, but yes this summarises why this particular language is good to use as a better JavaScript.
I've never seen breakpoints & source maps working properly; just a series of blog posts by various people who've tried and failed to get it working.
how do you do it then?
Easy, develop one language, ship using another to the largest user base.
"You.. just like the syntax?"
Code as data, macros, immutability, concurrency, access to libraries.