Introduction to Clojure

1.1 What is Clojure?

Clojure is a dynamic, functional, general-purpose Lisp created by Rich Hickey, first released in 2007. It runs on the JVM, with sister implementations ClojureScript (JavaScript), ClojureCLR (.NET), Babashka (native scripting via GraalVM), and Jank (native, LLVM, in development).

Core philosophy: simplicity, immutability by default, data orientation, pragmatic host interop, and managed state for concurrency.

1.2 Key Features

Immutable persistent data structures Vectors, maps, sets, and lists share structure efficiently (O(log₃₂ n) updates) Functional programming

First-class functions, higher-order functions, pure functions emphasized

Code is data, macros, REPL-driven development Model the domain with plain maps and vectors instead of classes

Atoms, refs (STM), agents, futures, core.async Host interop

Seamless access to the entire Java (or JS) ecosystem Sequence abstraction

One set of functions works over all collections Polymorphism à la carte Protocols and multimethods

Very conservative about breaking changes Dynamic development Change a running program from the REPL

1.3 Where Clojure Is Used

Nubank (one of the world's largest digital banks; runs on Clojure + Datomic), Walmart Labs, Apple, Netflix, Amazon, CircleCI, Metabase, Pitch, Funding Circle, Cisco (Threatgrid), Atlassian (historically), Puppet, Shopify (some services), Room Key, and many fintech/data companies.

Domains: backend services, data pipelines, financial systems, analytics, internal tools, and interactive frontends (ClojureScript).

1.4 Clojure's Ideas in One Picture

*"Simple Made Easy"* (Rich Hickey): prefer simple (one braid, unentangled) over easy (familiar, near at hand).

Values (immutable data)  +  Functions (transform values)  +  Identities (managed references to changing values over time)