Introduction

Clojure is a dynamic programming language for the Java Virtual Machine (JVM) with a compelling combination of features:

  • Clojure is elegant. Clojure’s clean, careful design lets you write programs that get right to the essence of a problem, without a lot of clutter and ceremony.

  • Clojure is Lisp reloaded. Clojure has the power inherent in Lisp but is not constrained by the history of Lisp.

  • Clojure is a functional language. Data structures are immutable, and most functions are free from side effects. This makes it easier to write correct programs and to compose large programs from smaller ones.

  • Clojure simplifies concurrent programming. Many languages build a concurrency model around locking, which is difficult to use correctly. Clojure provides several alternatives to locking: software transactional memory, agents, atoms, and dynamic variables.

  • Clojure embraces Java. Calling from Clojure to Java is direct and fast, with no translation layer.

  • Unlike many popular dynamic languages, Clojure is fast. Clojure is written to take advantage of the optimizations possible on modern JVMs.

Many other languages cover some of the features described in the previous list. Of all these languages, Clojure stands out. The individual features listed earlier are powerful and interesting. Their clean synergy in Clojure is compelling. We will cover all these features and more in Chapter 1, Getting Started.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.47.166