Clojure & ClojureScript?

I’m not knocking the capability of the tool but I do question the culture that gave rise to it’s development. It gives me the impression that Google decided to attempt to make frontend development more “Java-developer friendly” rather than to encourage their developers to engage web development on its own terms and become competent in web development in general (the whole “child proofing the world” vs. “world proofing the child” kind of issue).

My personal exposure to ClojureScript was primarily through Mimmo Cosenza’s excellent ClojureScript tutorial - Modern ClojureScript, partially with Études for ClojureScipt and some Reagent via Web Development with Clojure 2e.

So my speculative profile of a contented Clojure programmer? A Java-refugee fed up dealing with all the accidental complexity of the ecosystem seeking improved programmer happiness. A ClojureScript programmer is probably similarly motivated but needs to work on the frontend but would rather put up with “Java-isms” (having previously already been acclimatized to them) than deal with the usual JavaScript antics.

The problem is that you tend to end up writing “Clojure” code malipulating Java OO-style libraries (i.e. Closure Library - look for :import goog.Whatever and goog.events, goog.dom, etc.) on the one hand while interacting directly with JavaScript-y stuff whenever there is something the Closure Libraries don’t cover. So often you end up juggling the Lisp-y Clojure/Java OO/JavaScript mindset all at the same time.

Reagent was my first exposure to React. I can’t recommend that experience. Now that I have dealt with React on the JavaScript level I suspect that I would be in a better position to “get” Reagent. But that would mean that to appreciate Reagent you would have to “get to know” React via JavaScript first anyway.

(Fiddled with some of the early om.next stuff - but not enough to form any kind of opinion about it.)

At least with Elm/PureScript/BuckleScript you are only juggling two worlds - the language you choose and JavaScript. But try as you might at this point I don’t think there is a true escape from (competent) JavaScript.

While I liked Clojure, ClojureScript felt much more fragmented. Anyway all of this is just my opinion - as usual YMMV.

5 Likes