This story was written by Keith Dawson for UBM DeusM’s community Web site Develop in the Cloud, sponsored by AT&T. It is archived here for informational purposes only because the Develop in the Cloud site is no more. This material is Copyright 2012 by UBM DeusM.

How Clojure Stands

The third annual Clojure developers' survey is out, and finds the Lisp-derived language growing nicely.

For the third year, Clojure expert and author Chas Emerick has conducted an unscientific survey among developers using the language. The results point to steady growth in Clojure usage.

First of all, here are the this year's survey results. (And for historical context, here are 2011 and 2010.) This year the survey garnered 1,372 responses, vs. 670 last year and 487 in 2010. Emerick, co-author of Clojure Programming from O'Reilly, publicized the 2012 survey "primarily via Twitter and two messages to the main Clojure mailing list, which has approximately 6,700 subscribers." So the response has strong statistics behind it, even though responders were self-selecting. The survey was open for a week.

The name is pronounced "closure," like the functional programming concept Tim Kellogg wrote about last week. Clojure is a dialect of the Lisp language developed and evolved by Rich Hickey. The original implementation generated Java Virtual Machine bytecode, but other ports target .NET-compatible Common Language Runtime and Javascript.

In common with other Lisps, Clojure boasts strengths in functional programming and the development of robust multi-threaded programs. (For those not already conversant with Lisp, Moxley Stratton has written a Clojure primer that might prove useful.) Clojure is an open-source project licensed under the Eclipse Public License.

About the same percentage of developers as last year have been using Clojure for a year or more, but the number just getting started is up, indicating that the language may be gaining some traction. One goal of Clojure boosters is to get more enterprise and IT attention on the language (see this presentation by Neal Ford for some of the strategies being discussed toward this end). Emerick obliquely acknowledges that, among functional languages, Scala seems to be an easier sell than Clojure in the enterprise.

Developers have come to Clojure primarily from Java, Ruby, and Python; when asked to speculate what language they would embrace if Clojure "went away tomorrow," a plurality replied with Scala, Haskell, Python, and Common Lisp. (One loyal Clojure developer called that prospect "too depressing to contemplate.")

Of the various runtimes targeted by the different versions of Clojure, the original JVM-based one commands the lion's share of production and non-production use. But Javascript is coming up; 59 percent say they are evaluating ClojureScript. Fully 70 percent say they have no plans to use or investigate ClojureCLR, and it has almost no presence in production code. Emerick speculates "those targeting .NET are fundamentally unwilling to consider languages not officially supported by Microsoft."

The large majority of those using the Clojure language in production are aiming at Web deployment. This has been true for all three years of the survey and the numbers are getting more lopsided: from 53 percent in 2010 to 62 percent last year to 70 percent now.

On the subject of toolchains for build automation, Leiningen has run away with the field, being used by 95 percent of Clojure developers. Emerick quips, "Everyone uses Leiningen. The other 5 percent just wish they could." (Leiningen's subtitle is "for automating Clojure projects without setting your hair on fire." It was named for a classic short story involving ants -- Ant being an earlier build environment.)

When asked about their main frustration in the Clojure ecosystem, a 30 percent plurality responded that the documentation was either not comprehensive enough or not approachable for beginners.

Have you looked into Clojure for your development needs? Please let us know in the comments.