Description #
Clojure is a modern, dynamic, and functional dialect of Lisp that runs on the Java Virtual Machine (JVM). It combines the expressive power of Lisp with robust Java interop and immutable data structures, making it ideal for concurrent and data-centric programming.
History #
Clojure was created by Rich Hickey and released in 2007. It was designed to be a practical, modern Lisp for real-world software development. Since its release, it has gained a strong following among developers interested in functional programming, concurrency, and simplicity.
Hello World Code #
(println "Hello, World!")
How to Run #
Option 1: Online
Option 2: Local
- Install Leiningen (Clojure build tool):
https://leiningen.org - Create and run a project:
lein repl
Then enter:
(println "Hello, World!")
Key Concepts #
- Functional-first design
- Immutable data structures
- Persistent collections (vectors, maps, etc.)
- Macros and metaprogramming
- Java interoperability
- Software Transactional Memory (STM)
- Rich REPL-driven workflow
- Namespaces and pure functions
- Homoiconic syntax (code = data)
- Popular in data and concurrent applications
Try It Online #
Fun Facts #
- Clojure was developed over 2½ years by a single person, Rich Hickey.
- It’s widely used at companies like Nubank, Walmart, and Funding Circle.
- ClojureScript brings Clojure to the browser via JavaScript.