This chapter covers
- Clojure’s concept of identity and state
- The Clojure REPL
- Clojure syntax, data structures, and sequences
- Clojure interoperability with Java
- Clojure macros
Clojure is a very different style of language from Java and the other languages we’ve studied so far. Clojure is a JVM reboot of one of the oldest programming languages — Lisp. If you’re not familiar with Lisp, don’t worry. We’ll teach you everything you need to know about the Lisp family of languages to get you started with Clojure.
Note
Because Clojure is such a very different language, it might help to have an additional, Clojure-specific resource to consult while reading this chapter. A couple of excellent books are Clojure in Action (Manning, 2011. https://livebook.manning.com/book/clojure-in-action) and The Joy of Clojure (Manning, 2014. https://livebook.manning.com/book/the-joy-of-clojure-second-edition.
In addition to its heritage of powerful programming techniques from classic Lisp, Clojure adds amazing cutting-edge technology that’s very relevant to the modern Java developer. This combination makes Clojure a standout language on the JVM and an attractive choice for application development.
Particular examples of Clojure’s new tech are its concurrency toolkits (which we will meet in Chapter 16) and data structures (which we will introduce here and expand on in Chapter 15).