This is an introduction to Clojure, a family of hosted functional programming languages in the Lisp tradition.
The version of Clojure described here is hosted on Java and runs on the Java Virtual Machine (JVM). There are recent Clojure versions compatible with all the SUN/Oracle and OpenJDK versions commonly in use.
The other popular version of Clojure is called ClojureScript. ClojureScript is hosted on Javascript and runs on any Javascript engine that supports the Google Closure tool chain.
This is an introduction to the Clojure language only. It discusses syntax, semantics, and a bit about how the language got its spots: why Clojure looks the way it does and how to work with it. The concepts discussed in this introduction are relevant to any Clojure variant. There are other concepts around setting up projects: loading dependencies, establishing class and resource paths, and so on, that this introduction does not cover yet.
All the files that end in .clj
are Clojure source files.
Start at 000-intro.clj
and read on from there.
If you have a Clojure programming environment set up you can load the files as programs. I encourage you to do that, because working with Clojure is different from most other languages in common use today – even so-called dynamic languages. The best way to understand Clojure’s approach to programming is to play with it.
Alan Kay once remarked that “Lisp isn’t a language, it’s a building material.” The experience of building systems in Clojure feels very different from building systems in Java or Scala, or even Python or Ruby. I hope exploring these introductory files will help deliver the Clojure experience.
Good luck.