What Is Clojure?
Clojure is a modern Lisp for the Java Virtual Machine (JVM). Rich Hickey released it in 2007 to make it simpler to write robust programs that deal with data and concurrency. Today it's used for backend services, data processing, and fintech systems — Nubank, one of the world's largest digital banks, runs on it and now stewards the language.
(def languages ["Clojure" "Java" "Lisp" "Scala"])
(doseq [lang languages
:when (<= (count lang) 5)]
(println lang "has" (count lang) "letters"))
Java has 4 letters
Lisp has 4 letters
Scala has 5 letters
Its defining traits:
- A Lisp — code is written as nested lists in parentheses, like
(+ 1 2). The syntax is tiny and uniform, and because code is data, Clojure programs can transform code with macros. - Functional — you build programs from functions that take values and return new values, instead of changing things in place.
- Immutable data by default — vectors, maps, and sets never change; "adding" to one returns a new one that efficiently shares structure with the old.
- Data-oriented — information is represented as plain maps and vectors rather than custom classes, so one large library of functions works on everything.
- Hosted — Clojure runs on the JVM with direct access to every Java library. ClojureScript compiles the same language to JavaScript.
- REPL-driven — you develop by evaluating code in a running program and growing it step by step.
This course teaches Clojure 1.12 (examples were run on Clojure 1.12.6 with Java 21).