Clojure
Adapted from Wikipedia · Adventurer experience
Clojure is a special kind of programming language that runs on the Java platform. It is both dynamic and functional, meaning it can change and work well with data.
Clojure uses a unique way of writing code called S-expressions. These help make it easy to work with lists, maps, sets, and vectors.
Clojure was created by Rich Hickey in the mid-2000s. It focuses on immutability, which means data doesn’t change once it’s created. This helps programmers build reliable programs. Clojure also works on other systems like .NET. Rich Hickey still leads the development of Clojure.
History
Rich Hickey created the Clojure language. Before Clojure, he worked on a project called dotLisp for the .NET platform. He also made projects to connect Common Lisp with Java.
Hickey started working on Clojure in 2005. He worked on it for two and a half years before sharing it in October 2007. During this time, he worked alone, with help from his wife, Stephanie Hickey, who listened and talked about the language. He told friends in the Common Lisp community about Clojure through an email.
The name "Clojure" is a fun change of the word "closure". It includes the letters C, L, and J for C#, Lisp, and Java. These three languages influenced Clojure's design.
Design
Rich Hickey created Clojure to be a modern Lisp for functional programming. It works well with the Java platform and helps with concurrency. He thinks programming languages and software should be simple, with loose coupling and stateless functions.
Clojure uses identities to handle changes over time. These identities are made of unchanging states, so many workers can use them together without trouble. Clojure has special types called reference types to manage these changes.
Clojure runs on the Java platform. This lets it call Java code and be called from Java. It has tools like the Clojure command-line interface and Leiningen to help with projects and manage Maven integration.
As a Lisp dialect, Clojure treats functions as important objects. It supports lazy sequences and encourages immutability and persistent data structures. Clojure focuses on recursion and higher-order functions instead of loops with side effects. For handling many tasks at once, Clojure uses software transactional memory, a reactive agent system, and channel-based programming.
Extensible Data Notation
Extensible Data Notation, or edn, is a special way to share data from the Clojure language. It helps save and load Clojure data, and Clojure uses a version of edn to write its programs.
Like JSON or XML, edn includes many built-in parts, such as words, numbers, and groups of items. It can also grow by using special signs called tags. These tags start with # and a word, helping the system know how to handle the data that follows. This makes edn flexible without needing extra rules.
Alternative platforms
Clojure mainly works with Java, but it can also run on other platforms. One popular version is ClojureScript, which changes Clojure code into ECMAScript for web browsers. There is also ClojureCLR, which works with the .NET platform.
Other versions of Clojure include:
- Babashka, which uses GraalVM
- ClojureDart for mobile and desktop apps using Dart and Flutter
- Clojerl on the BEAM virtual machine used by Erlang
- basilisp, targeting Python 3.8+
- ClojureRS on Rust
- Ferret, compiling to C++11 for small devices
- jank, using C++ and LLVM
- Joker, an interpreter and linter in Go
Tools
There are many tools to help people write Clojure code. Some popular ones work with programs like Emacs, IntelliJ IDEA, Sublime Text, Vim, and Visual Studio Code. These tools have special add-ons to make writing Clojure easier.
Clojure also has its own command-line tools that work on Linux, macOS, and Windows computers. These tools help you manage and run your Clojure projects.
Development
The Clojure team works together to build and improve the language. You can visit a special website, ask.clojure.org, to see their work and share your ideas. If an idea is important, a team member will add it to their list of tasks. These tasks are reviewed by a group of people and then approved by the leader, Rich Hickey.
Impact
Clojure has grown popular with software developers who work with the Java platform. Many well-known developers and companies use Clojure. For example, big companies like Apple, Netflix, and NASA use Clojure in their work.
In a survey from 2018, Clojure was one of the most used programming languages on the Java platform for important applications. In a more recent survey from 2023, developers who had used Clojure liked it very much, and many said they wanted to keep using it. However, fewer developers wanted to learn Clojure compared to other popular languages like JavaScript.
Release history
| Version | Release date | Major features, improvements |
|---|---|---|
| October 17, 2007 (2007-10-17) | Initial public release | |
| 1.0 | May 4, 2009 (2009-05-04) | First stable release |
| 1.1 | December 31, 2009 (2009-12-31) | Futures |
| 1.2 | August 19, 2010 (2010-08-19) | Protocols |
| 1.3 | September 23, 2011 (2011-09-23) | Enhanced primitive support |
| 1.4 | April 15, 2012 (2012-04-15) | Reader literals |
| 1.5 | March 1, 2013 (2013-03-01) | Reducers |
| 1.5.1 | March 10, 2013 (2013-03-10) | Fixing a memory leak |
| 1.6 | March 25, 2014 (2014-03-25) | Java API, improved hashing algorithms |
| 1.7 | June 30, 2015 (2015-06-30) | Transducers, reader conditionals |
| 1.8 | January 19, 2016 (2016-01-19) | Additional string functions, direct linking, socket server |
| 1.9 | December 8, 2017 (2017-12-08) | Integration with spec, command-line tools |
| 1.10 | December 17, 2018 (2018-12-17) | Improved error reporting, Java compatibility |
| 1.10.1 | June 6, 2019 (2019-06-06) | Working around a Java performance regression and improving error reporting from clojure.main |
| 1.10.2 | January 26, 2021 (2021-01-26) | Java interoperability/compatibility improvements and other important language fixes |
| 1.10.3 | March 4, 2021 (2021-03-04) | prepl support for reader conditionals |
| 1.11.0 | March 22, 2022 (2022-03-22) | New syntax for keyword argument invocation, new clojure.math namespace, namespace aliasing without loading, and new helper functions added to clojure.core |
| 1.11.1 | April 5, 2022 (2022-04-05) | Rolling back unintended change in binary serialisation of objects of types clojure.lang.Keyword and clojure.lang.ArraySeq. |
| 1.11.2 | March 8, 2024 (2024-03-08) | Fix for CVE-2024-22871 Denial of Service |
| 1.12.0 | September 5, 2024 (2024-09-05) | Java method values, params type hints, array class syntax, add-lib, clojure.java.process |
| 1.12.1 | June 2, 2025 (2025-06-02) | Includes bug fixes, improved interop, enhanced tool support, and metadata updates. |
| 1.12.2 | August 25, 2025 (2025-08-25) | Fixes for CLJ-2914, CLJ-1798, CLJ-2916 and CLJ-2917. |
| 1.12.3 | August 25, 2025 (2025-08-25) | Fix for CLJ-2919. |
| Latest version: 1.12.4 | December 10, 2025 (2025-12-10) | Fix for CLJ-2924. |
Legend: Unsupported Supported Latest version Preview version Future version | ||
Related articles
This article is a child-friendly adaptation of the Wikipedia article on Clojure, available under CC BY-SA 4.0.
Images from Wikimedia Commons. Tap any image to view credits and license.
Safekipedia