Chapter 10. Clojure: safer programming
This chapter covers
- Clojure’s concept of identity and state
- The Clojure REPL
- Clojure syntax, data structures, and sequences
- Clojure interoperability with Java
- Multithreaded development with Clojure
- Software transactional memory
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.
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 and data structures. The concurrency abstractions enable programmers to write much safer multithreaded code. These can be combined with Clojure’s seq abstraction (a different take on collections and data structures) to provide a very powerful developer toolbox.