ClojureScript: The industry's favorite functional frontend language
By Zach Oakes on January 21st, 2017
Is there a rift between the software industry and the software peanut gallery? Is asking a question with an obvious answer a useful rhetorical device?
The main languages in this category are ClojureScript, Scala.js, Elm, PureScript, and GHCJS. In an alternate universe, they're the members of an embarrassing boy band. Now, I'm specifically interested in industrial use, so Github stars, TIOBE, Google Trends, and vain laptop stickers are irrelevent. Instead, I suggest perusing this list of companies using ClojureScript.
Granted, some companies keep a tight lid on their tech choices, but there's no reason to believe a language would be underrepresented because of that. After all, a given language shouldn't inspire more secrecy than any other. Except for LabVIEW, of course — I know a guy who uses that, and he's a shady little bastard.
My intent is not to cast aspersions (though I enjoy doing that as well), but rather to ask — and answer — what is it about ClojureScript that appeals to the industry but not to the tech crowd?
- Stability - Companies don't want to update their code every time you decide to rename a function in your standard library. Its role in Java's dominance can't be overstated. This culture, explained beautifully by Brian Goetz, made its way into Clojure and ClojureScript, who haven't made breaking changes in the five years I've used them.
- Google Closure - An important early decision was to hitch ClojureScript's wagon to the Google Closure project, which provides both a huge standard library and a dead code eliminator. Google Closure allowed it to avoid much of the generated code bloat and runtime cost normally associated with compile-to-JS languages. Despite its utility, the tech crowd frowns upon it due to its Java dependency.
By contrast, what are the qualities most sought after by the tech crowd?
- Openness - Some people have an adamant belief that a language should be developed "in the open", preferably on Github, and take input from the community. In contrast, Clojure(Script) uses JIRA, requires signing a CA, and most decisions are made Willy Wonka style by Rich Hickey. This irks some people, perhaps on philosophical (egalitarian) grounds, but unsurprisingly companies couldn't care less.
- Easiness - For individuals working for pleasure, the beginner experience is more important than it is for companies. Admittedly, ClojureScript still has poor documentation and error messages. Instead of with static typing, both are being tackled in a very "clojuresque" way by spec.
A lot of this dichotomy can be cast in terms of practicality and idealism. Companies with budgets and deadlines care about the former, while hobbyists tend to indulge more in the latter. That being said, the beginner experience is important. If you're a beginner, try my new cloud IDE. In a few clicks you can start a project, break things, hit a roadblock, and hate yourself. It'll be great.