Clojure is a modern Lisp dialect released by Rich Hickey in October 2007, with version 1.0 following in May 2009. It runs on the Java Virtual Machine and focuses on immutable data and safe concurrency. The question of why Rich Hickey built Clojure on the JVM gets at the heart of the language: he wanted Lisp's power without asking companies to give up the platform, libraries and operations knowledge they already trusted.

Why Rich Hickey built Clojure on the JVM

Hickey was an experienced C++, Java and C# developer who also loved Common Lisp. Before Clojure he had written bridges between Lisp and mainstream runtimes, including jfli for Java and dotLisp for .NET. He then spent roughly two and a half years working on Clojure largely at his own expense.

His reasons for choosing a hosted design were practical:

  • Libraries: Clojure code can call any Java class directly, so a new language gets a huge ecosystem on day one.
  • Runtime quality: the JVM already had a mature JIT compiler, garbage collectors and profiling tools.
  • Acceptance: a Clojure program ships as an ordinary JAR, which is far easier to get past an operations team than an unfamiliar runtime.

The same "hosted language" idea later produced ClojureScript (2011), which compiles to JavaScript, and ClojureCLR for .NET.

Design and key features

Clojure is a Lisp, so code is written as data structures (homoiconicity) and macros can transform it. But Hickey broke with older Lisps in several ways:

  • Persistent immutable collections: vectors, maps and sets use structural sharing, based on Phil Bagwell's hash array mapped tries, so "changing" a map creates a new version cheaply.
  • Literal syntax for vectors [], maps {} and sets #{}, which also became the EDN data format.
  • Managed references: atoms for independent state, refs with software transactional memory for coordinated changes, and agents for asynchronous updates.
  • Sequences and laziness as a common abstraction over all collections.
  • Protocols and multimethods for polymorphism without class hierarchies.
  • REPL-driven development, where you build programs by evaluating forms in a running system.

Hickey explained much of this thinking in talks such as "Simple Made Easy" (2011), which became widely watched outside the Clojure community.

A short Clojure example

(def inventory {:apples 3 :pears 0 :plums 7})

(defn in-stock [m]
  (->> m
       (filter (fn [[_ qty]] (pos? qty)))
       (map key)
       sort))

(def counter (atom 0))
(dotimes [_ 1000] (swap! counter inc))

(println (in-stock inventory))        ; (:apples :plums)
(println @counter)                    ; 1000
(println (assoc inventory :pears 5))  ; a new map; inventory is unchanged

The ->> threading macro reads as a pipeline, the atom gives safe shared state, and assoc returns a new map instead of mutating the old one.

Versions and milestones

YearMilestone
2007First public release
2009Clojure 1.0
2011ClojureScript announced
2013core.async library for channel-based concurrency
2015Clojure 1.7: transducers and reader conditionals
2017Clojure 1.9: clojure.spec

Clojure is known for stability: code written for early versions usually runs unchanged on current releases.

Where Clojure is used today

Hickey also created Datomic, an immutable database, and his company merged into Cognitect in 2013. In 2020 the Brazilian digital bank Nubank, one of the largest Clojure users in the world, acquired Cognitect. Other well-known users include Walmart, CircleCI and Metabase. Common tools include Leiningen and the official Clojure CLI with deps.edn, and Babashka offers fast-starting Clojure scripts.

Influence

Clojure's persistent data structures inspired immutable collection libraries in JavaScript, Scala and other languages, and its ideas about state and identity influenced how many developers think about front-end state management. Elixir's designers have cited it as an influence, and several smaller Lisps, including Hy and Joker, follow its syntax.

Should you learn Clojure?

Learn Clojure if you want to experience interactive, data-oriented programming or if you work on systems where shared mutable state causes bugs. The parentheses take a week or two to stop noticing; the JVM stack traces take longer. Understanding why Rich Hickey built Clojure on the JVM explains its appeal: it is a Lisp designed for real production systems, not a research toy.

Frequently asked questions

Can Clojure use existing Java libraries?

Yes. Clojure has direct interop syntax for creating Java objects, calling methods and implementing interfaces. Most Clojure projects use at least a few Java libraries, for example for database drivers or HTTP servers.

Is Clojure only for the JVM?

No. ClojureScript compiles to JavaScript for browsers and Node.js, and ClojureCLR targets .NET. Babashka runs Clojure scripts as a fast native binary built with GraalVM.

Who maintains Clojure today?

Clojure's core team works at Nubank, which acquired Cognitect in 2020. Changes to the language are reviewed carefully by the core team, which is one reason Clojure is known for backward compatibility.