What's the best introduction to Clojure

Book: "Clojure - Basics, Concurrent Programming, Java"

Online version

This book has been completely online since the beginning of 2015. This version was created with the help of TeX4ht. TO THE BOOK

Book Description


Basics, Concurrent Programming, Java
Stefan Kamphausen / Tim Oliver Kaiser

The book gives an introduction to the philosophy and technology of the young and concurrency-focused programming language Clojure.

After a detailed introduction to the basics of the language, the integration with Java in both directions and the special features with regard to concurrent programming are explained.

It concludes with a description of key libraries and a discussion of the current state of Clojure. Important concepts of functional programming are mentioned as well as background information that explains technical details - such as the implementation of persistent data structures.

With more than 400 examples, the book introduces the reader to the language practically. The representation is based on Clojure version 1.2.

Target group: Java programmers, computer science students, those interested in Clojure and / or Lisp.

See also http://www.dpunkt.de/buecher/3372.html


At the end of 2008 I (SK) became aware of Clojure, but found no reason to deal with it in more detail. This came about when I was persuaded to give a talk at SourceTalk 2009. While I was still rebuilding the material that was created at the time for an article in the German Linux magazine, dpunkt.verlag approached me and we agreed that we should work on the project together Clojure book want to tackle. I was able to win my esteemed colleague Tim Oliver Kaiser, who above all knows the Java world a lot better than I, as a co-author.

This book was announced in March 2010 and was scheduled to appear on September 20, 2010.

Development and other news

The full book is now available online. See link bar.
Stefan maintains his lectures and articles on Clojure on his private website
The first English-language article, again on STM in the Software Developer's Journal.
Both tok and in will again be offering presentations on Clojure topics at SourceTalk this year.
Linux magazine also has a review.
There is a review at Heise.
Various reading samples are available in PDF format on the publisher's website for the book.
A reading sample of the book can be found in "Java aktuell", the IJUG magazine (as far as I know, not available online).
The covers are updated.
Finished! On Monday it goes to the print shop.
The subtitle has been changed. Formerly "Introduction and Practice", now "Basics, Concurrent Programming, Java". Cover picture will follow as soon as it is available. The description (see text above) has also been updated.
Hans Dockter, founder of Gradle Build Systems and managing director of Gradle GmbH, kindly contributed a foreword.
We are offering a workshop for Clojure beginners at this year's SourceTalk. Registration
The corrections were in the mail today and will be incorporated.
The manuscript is available for editing by the publisher.
Prof. Dr. Volker Ahlers wrote a foreword.
The book will cover Clojure 1.2.

Table of Contents

  1. introduction
    1. history
    2. Who is this book for
    3. warning
    4. Version of Clojure used
    5. about this book
    6. Acknowledgments
  2. The language
    1. Essential properties
    2. Basic course in Lisp
    3. REPL
    4. documentation
    5. Use Java
    6. Data types
    7. Variable bindings and namespaces
    8. output
    9. Equality, truth and zero
    10. Conditional statements
    11. Exceptions
    12. instructions
    13. Regular expressions
    14. Recursion
    15. Metadata
    16. Sequences
    17. various
    18. From the source code to the result
  3. Concurrency
    1. State and time
    2. Special features of the data structures
    3. Handling mutable identities
    4. Reference types
    5. Threads
    6. Transient data structures
    7. Background: Clojures STM
    8. Example: genetic algorithm
  4. Java
    1. Java from Clojure
    2. Interfaces and derived classes
    3. Example: Plot of a bifurcation
    4. Clojure as a scripting language
    5. Clojure is also a library
    6. Tuning and HotSpot
    7. delivery
    8. Background: Details on the implementation
  5. Protocols and Datatypes
    1. Expression problem
    2. Abstractions: Protocols
    3. Specification: Datatypes
    4. Conclusion
  6. Libraries
    1. Input / output
    2. XML
    3. Automated software tests
    4. External programs
    5. Inspector
    6. Walking through trees
    7. REPL utils
    8. Pretty print
    9. Trace
    10. SQL
    11. Dataflow
    12. graduation
  7. Conclusion
    1. Clojure's future
    2. criticism
    3. curtain


No book is flawed. About five minutes after receiving the advance copy, I found the first bug. I suspect it is a basic law of the writing guild.

A separate page is dedicated to errors: Errata.


Even if active typing does a good job of getting used to a new programming language, some things degenerate into useless typing.

That's why we have a dedicated page for the listings: Listings.

Feedback and questions

We are always available for questions or feedback. Please send an email to "ska" / at \ clojure-buch -dot- de or "tok" / at \ clojure-buch -dot- de.


Responsible for the websites on the domain www.clojure-buch.de is:
Stefan Kamphausen
Pilgersdorfer Weg 4
13465 Berlin
ska / at \ clojure-book -dot- de

Notice of liability: Despite careful control of the content, we assume no liability for the content of external links. The operators of the linked pages are solely responsible for their content.

All content is © Copyright 2010 Kamphausen, Kaiser, dpunkt.verlag. The cover is used with the kind permission of dpunkt.verlag.