Cloud Parts

Clojure

A dynamic Lisp hosted on the JVM, built around immutable persistent data structures and interactive development at the REPL.

Type
Open source
Made by
Rich Hickey / Clojure core team
License
Eclipse Public License 1.0
Facts checked
8 October 2026

What it is

Clojure is a Lisp: code is written as lists, vectors and maps, the same data structures programs work with, so macros can transform code like any other data. It is hosted on purpose. It shares the JVM’s type system, garbage collector and threads, compiles every function to JVM bytecode, and calls Java classes directly. ClojureScript brings the same language to JavaScript.

All of Clojure’s collections (lists, vectors, maps and sets) are immutable and persistent: “changing” one returns a new version that shares most of its structure with the old one, so both stay valid and cheap. Maps and vectors are trees with 32-way branching, based on hash array mapped tries. For the state that must change, Clojure offers reference types with defined concurrency semantics: atoms, agents, and refs updated in software transactions.

Work happens at the REPL (read-eval-print loop): you connect to a running program, often from your editor, and evaluate one expression at a time to try ideas, inspect data and redefine functions without restarting.

Why teams pick it

  • Immutable data by default makes values safe to share between threads without locks
  • REPL-driven development against a live program gives very short feedback loops
  • Full access to Java libraries and the JVM’s mature runtime, with no wrapper layer
  • A strong commitment to stability: breaking changes are strenuously avoided, so old code keeps running on new releases

Watch out for

  • Dynamic typing: type errors surface at runtime, not at compile time
  • Error messages and JVM stack traces are hard to read, a weakness Rich Hickey says should have been prioritized earlier
  • A small community compared with Java or Python; users report internal evangelism and hiring as the main obstacles to adoption

Alternatives

What all run on a virtual machine have in common →

How it fits with other technologies

Immutable maps and a threading macro · clojure

(def order {:id 42 :items ["tea" "cake"]})

;; assoc returns a new map; the original value never changes
(def paid (assoc order :status :paid))

(println order)  ; {:id 42, :items [tea cake]}
(println paid)   ; {:id 42, :items [tea cake], :status :paid}

;; ->> threads each result into the next call
(println (->> (range 10)
              (filter even?)
              (map #(* % %))
              (reduce +)))  ; 120

See it in a real stack

No architecture uses Clojure yet. Drop it into the playground and wire it up yourself.Open playground →
Where it came from2005–2020

Rich Hickey had built commercial software since 1987, first in C++, then in Java and C#. Hickey wanted a language as acceptable to employers as Java or C#, but with a much simpler programming model for the information systems Hickey worked on. In Hickey’s experience, statically typed class models fit that work poorly, and mutable shared state made multithreaded programs hard to get right.

In 2005 Hickey started a sabbatical funded from Hickey’s own retirement savings and spent it on Clojure, doing all of the implementation alone. The breakthrough was a fast persistent hash map: a hash array mapped trie with 32-way branching that made immutable collections practical. Hickey announced Clojure on October 17, 2007, and released 1.0 in May 2009. Hickey never returned from the sabbatical.

ClojureScript followed in 2011 and the Datomic database in 2012. In 2013 Hickey’s companies merged into Cognitect, which paid the core team, and in 2020 Cognitect joined Nubank, a company that had built its systems on Clojure and Datomic since 2013. Hickey still leads the language.

Why it’s built this way

Host on the JVM instead of building a new platform
Customers had invested in, and trusted, platforms like the JVM. Running there gave Clojure the JVM’s performance, garbage collector and every Java library from day one.
A Lisp, but not bound to Common Lisp or Scheme
Code as data and macros were the attraction, but the standard Lisps had mutable core data structures and no concurrency in their specs. Clojure kept the idea and broke compatibility.
Immutable, persistent collections by default
Immutable values can be shared between threads freely. Hickey only felt Clojure could be practical once persistent maps and vectors performed close to mutable ones.
Explicit reference types for change
Instead of locks, state that must change lives in refs, agents and atoms, each with defined rules for concurrent updates.

Timeline

  1. 2005

    Hickey starts Clojure during a self-funded sabbatical

  2. 2007

    Announced and released as open source on October 17

  3. 2009

    Clojure 1.0 released in May

  4. 2011

    Work starts on ClojureScript, for JavaScript

  5. 2013

    Cognitect forms and becomes Clojure’s corporate sponsor; core.async arrives

  6. 2020

    Hickey’s HOPL paper “A History of Clojure”; Nubank and Cognitect join forces

Sources7 · facts checked 8 October 2026

Improve this page on GitHub