History
dotLisp
, a similar project based on the jfli
), A ''Foreign Object Interface for Lisp'' (FOIL), and a ''Lisp-friendly interface to Java Servlets'' (Lisplets).
Hickey spent about two and a half years working on Clojure before releasing it publicly in October 2007, much of that time working exclusively on Clojure with no outside funding. At the end of this time, Hickey sent an email announcing the language to some friends in the Common Lisp community.
Clojure's name, according to Hickey, is a Design
Rich Hickey developed Clojure because he wanted a modernrecur
keyword. For parallel and concurrent programming Clojure provides software transactional memory, a reactive agent system, and channel-based concurrent programming.
Clojure 1.7 introduced reader conditionals by allowing the embedding of Clojure, ClojureScript and ClojureCLR code in the same namespace. Transducers were added as a method for composing transformations. Transducers enable higher-order functions such as map and fold to generalize over any source of input data. While traditionally these functions operate on sequences, transducers allow them to work on channels and let the user define their own models for transduction.
Extensible Data Notation
Extensible Data Notation, or edn, is a subset of the Clojure language intended as a data transfer format. It can be used to serialize and deserialize Clojure data structures, and Clojure itself uses a superset of edn to represent programs. edn is used in a similar way totrue
, false
* strings: "foo bar"
* characters: \c
, \tab
* symbols: name
* keywords: :key
* integers: 123
* floating point numbers: 3.14
* lists: (a b 42)
* vectors: b 42/code>
* maps:
* sets: #
* nil: nil
(a null-like value)
In addition to those elements, it supports extensibility through the use of ''tags'', which consist of the character #
followed by a symbol. When encountering a tag, the reader passes the value of the next element to the corresponding handler, which returns a data value. For example, this could be a tagged element: #myapp/Person
, whose interpretation will depend on the appropriate handler of the reader.
This definition of extension elements in terms of the others avoids relying on either convention or context to convey elements not included in the base set.
Alternative platforms
The primary platform of Clojure is Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
, but other target implementations exist. The most notable of these is ClojureScript, which compiles to ECMAScript
ECMAScript (; ES) is a standard for scripting languages, including JavaScript, JScript, and ActionScript. It is best known as a JavaScript standard intended to ensure the interoperability of web pages across different web browsers. It is stan ...
3, and ClojureCLR, a full port on the .NET
The .NET platform (pronounced as "''dot net"'') is a free and open-source, managed code, managed computer software framework for Microsoft Windows, Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft emplo ...
platform, interoperable with its ecosystem.
Other implementations of Clojure on different platforms include:
* Babashka, Native Clojure scripting language leveraging GraalVM native image and Small Clojure Interpreter
* CljPerl, Clojure on Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language".
Perl was developed ...
* ClojureDart, Extend Clojure's reach to mobile & desktop apps by porting Clojure to Dart and Flutter
* Clojerl, Clojure on BEAM, the Erlang virtual machine
In computing, a virtual machine (VM) is the virtualization or emulator, emulation of a computer system. Virtual machines are based on computer architectures and provide the functionality of a physical computer. Their implementations may involve ...
* basilisp, A Clojure-compatible(-ish) Lisp dialect targeting Python 3.8+
* ClojureRS, Clojure on Rust
Rust is an iron oxide, a usually reddish-brown oxide formed by the reaction of iron and oxygen in the catalytic presence of water or air moisture. Rust consists of hydrous iron(III) oxides (Fe2O3·nH2O) and iron(III) oxide-hydroxide (FeO(OH) ...
* Ferret, compiles to self-contained C++11 that can run on microcontrollers
* jank, Native Clojure hosted in C++ on an LLVM-based JIT
* Joker, an interpreter and linter written in Go
* Las3r, a subset of Clojure that runs on the ActionScript
ActionScript is an object-oriented programming language originally developed by Macromedia Inc. (later acquired by Adobe). It is influenced by HyperTalk, the scripting language for HyperCard. It is now an implementation of ECMAScript (mean ...
Virtual Machine (the Adobe Flash Player platform)
* Pixie, Clojure-inspired Lisp dialect written in RPython
* Rouge, Clojure on YARV in Ruby
Ruby is a pinkish-red-to-blood-red-colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapph ...
Tools
Tooling for Clojure development has seen significant improvement over the years. The following is a list of some popular IDEs and text editor
A text editor is a type of computer program that edits plain text. An example of such program is "notepad" software (e.g. Windows Notepad). Text editors are provided with operating systems and software development packages, and can be used to c ...
s with plug-ins that add support for programming in Clojure:
* Emacs
Emacs (), originally named EMACS (an acronym for "Editor Macros"), is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, s ...
, with CIDER
* IntelliJ IDEA, with Cursive (a free license is available for non-commercial
A non-commercial (also spelled noncommercial) activity is an activity that is not carried out in the interest of Profit (economics), profit. The opposite is Commerce, commercial, something that primarily serves profit interests and is focused on bu ...
use)
* Sublime Text, with Clojure Sublimed, or Tutkain,
* Vim, with fireplace.vim, vim-elin, or Conjure (Neovim only)
* Visual Studio Code
Visual Studio Code, commonly referred to as VS Code, is an integrated development environment developed by Microsoft for Windows, Linux, macOS and web browsers. Features include support for debugging, syntax highlighting, intelligent code comp ...
, with Calva or Clover
* IDE-agnostic (using the Language Server Protocol for static analysis and/or linting): clj-kondo or clojure-lsp
In addition to the tools provided by the community, the official Clojure command-line interface
A command-line interface (CLI) is a means of interacting with software via command (computing), commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user ...
(CLI) tools have also become available on Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
, macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
, and Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
since Clojure 1.9.
Development
The development process is restricted to the Clojure core team, though issues are publicly visible at the Clojure JIRA project page. Anyone can ask questions or submit issues and ideas at ask.clojure.org. If it's determined that a new issue warrants a JIRA ticket, a core team member will triage it and add it. JIRA issues are processed by a team of screeners and finally approved by Rich Hickey.
Impact
With continued interest in functional programming, Clojure's adoption by software developers using the Java platform has continued to increase. The language has also been recommended by software developers such as Brian Goetz, Eric Evans, James Gosling
James Arthur Gosling (born 19 May 1955) is a Canadian computer scientist, best known as the founder and lead designer behind the Java (programming language), Java programming language.
Gosling was elected a member of the National Academy of E ...
, Paul Graham, and Robert C. Martin. ThoughtWorks, while assessing functional programming languages for their Technology Radar, described Clojure as "a simple, elegant implementation of Lisp on the JVM" in 2010 and promoted its status to "ADOPT" in 2012.
In the "JVM Ecosystem Report 2018" (which was claimed to be "the largest survey ever of Java developers"), that was prepared in collaboration by Snyk and Java Magazine, ranked Clojure as the 2nd most used programming language on the JVM for "main applications". Clojure is used in industry by firms such as Apple
An apple is a round, edible fruit produced by an apple tree (''Malus'' spp.). Fruit trees of the orchard or domestic apple (''Malus domestica''), the most widely grown in the genus, are agriculture, cultivated worldwide. The tree originated ...
, Atlassian
Atlassian Corporation () is an Australia, Australian-United States, American proprietary software company that specializes in collaboration tools designed primarily for software development and project management. Domicile (law), Domiciled in ...
, Funding Circle, Netflix
Netflix is an American subscription video on-demand over-the-top streaming service. The service primarily distributes original and acquired films and television shows from various genres, and it is available internationally in multiple lang ...
, Nubank, Puppet
A puppet is an object, often resembling a human, animal or Legendary creature, mythical figure, that is animated or manipulated by a person called a puppeteer. Puppetry is an ancient form of theatre which dates back to the 5th century BC in anci ...
, and Walmart
Walmart Inc. (; formerly Wal-Mart Stores, Inc.) is an American multinational retail corporation that operates a chain of hypermarkets (also called supercenters), discount department stores, and grocery stores in the United States and 23 other ...
as well as government agencies such as NASA
The National Aeronautics and Space Administration (NASA ) is an independent agencies of the United States government, independent agency of the federal government of the United States, US federal government responsible for the United States ...
. It has also been used for creative computing, including visual art, music, games, and poetry.
In the 2023 edition of Stack Overflow
In software, a stack overflow occurs if the call stack pointer exceeds the stack bound. The call stack may consist of a limited amount of address space, often determined at the start of the program. The size of the call stack depends on many fa ...
Developer Survey, Clojure was the fourth most ''admired'' in the category of programming and scripting languages, with 68.51% of the respondents who have worked with it last year saying they would like to continue using it. In the ''desired'' category, however it was marked as such by only 2.2% of the surveyed, whereas the highest scoring JavaScript
JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior.
Web browsers have ...
was ''desired'' by 40.15% of the developers participating in the survey.
Release history
See also
* List of JVM languages
This list of JVM languages comprises notable computer programming languages that are used to produce computer software that runs on the Java virtual machine (JVM). Some of these languages are interpreted by a Java program, and some are compiled ...
* List of CLI languages
* Comparison of programming languages
References
Further reading
*
*
*
*
*
*
*
*
*
*
*
*
*
*
External links
*
{{Authority control
2007 software
Articles with example Clojure code
Cross-platform free software
Cross-platform software
Dynamic programming languages
Dynamically typed programming languages
Extensible syntax programming languages
Functional languages
High-level programming languages
JVM programming languages
Lisp (programming language)
Lisp programming language family
Multi-paradigm programming languages
Programming languages
Programming languages created in 2007
Scripting languages
Software using the Eclipse Public License
Source-to-source compilers