Introducing Clojure
ver. 1.0.0
Learn Clojure’s identity as a modern Lisp, its functional core with persistent immutable data, and how it uses the JVM for interop and concurrency
A compact introduction to Clojure that makes you comfortable reading Lisp syntax, understanding the functional requirements (functions-as-values, purity/immutability/controlled state), and using Java interoperability and JVM threading. By the end you can read and write prefix forms, explain structural sharing and the distinction between values and identities, call Java methods/constructors, and name the Clojure concurrency primitives built on JVM threads.
This unit grounds you in three tightly linked ideas: Clojure’s place in the Lisp family, what it means to program functionally with immutable, persistent data, and what hosting on the JVM implies for interop and concurrency.
You will learn to read and write Clojure’s prefix notation (including nested and variable-arity calls) and to see the two roles parentheses play: delimiting function calls (first element = function, rest = args) and constructing list values. You will be able to explain why the second role—lists as data—matters for macros and metaprogramming later.
You will understand the minimum requirement for a functional language: functions are first-class values, and how most functional languages typically add referentially transparent (pure) functions, immutable data by default, and explicit, controlled mechanisms for managing change. You will be able to distinguish immutable values (which never change) from identities (named containers that can hold different values over time) and explain why immutability need not be slow: persistent data structures use structural sharing, creating new nodes only along edited paths so updates are efficient.
You will know what hosting on the JVM provides and what it requires: Clojure compiles to JVM bytecode, reuses JVM types (e.g., Java String, boxed numerics), and interops directly with Java’s standard library. Practically, you will be able to perform interop using the dot operator and its sugar: access static members, call instance methods, and invoke constructors from Clojure code.
Finally, you will understand the concurrency implications: JVM threads map to native OS threads allowing true parallelism, and Clojure builds concurrency abstractions on top of them—vars, atoms, refs, agents, futures, and promises—to give controlled, idiomatic ways to manage mutable state and asynchronous computation.
After this unit you can read basic Clojure code, explain its design trade-offs, perform straightforward Java interop, and name the key data- and concurrency-related primitives you will use as you move from syntax and concepts to interactive development at the REPL.
Materials
Source document
- Clojure in Action (2nd Edition), A. Rathore and F. Avila, Manning, Dec. 2015 — Link — Page 24-38