Clojure is a modern, functional, Lisp programming language that runs primarily on the Java Virtual Machine. It has built-in interoperability with Java, such that Clojure code can call Java code and libraries directly.
Learning Clojure will give you an understanding of one of the world's best programming languages, as well as a new was of thinking about software development.
If you:
- Know at least 1 other programming language (Java, JS, Python etc.)
- Are interested in Clojure
- Enjoy building a working example as you go
- Want something quick to digest and enjoyable
... then this guide might be for you.
We will be building a console-based Tetris clone, stripped down to its bare essentials, as part of this guide.
Tetris is my go-to puzzle to implement whenever I attempt to learn a new language. It has simple rules and can be implemented in fewer than 500 LOC for most languages. Choosing the same problem to implement over and again lets me focus on the language first. I can quickly compare it to other solutions, and get an idea of how this language forces (encourages) me to think.
Source is found in the src
folder. It should be runnable as a Leiningen project