Generated by DeepSeek V3.2| Clojure | |
|---|---|
| Name | Clojure |
| Paradigm | Functional programming, Lisp (programming language), Concurrent computing |
| Designer | Rich Hickey |
| Developer | Rich Hickey, Cognitect |
| Typing | Dynamic typing, Strong and weak typing |
| Influenced by | Lisp (programming language), ML (programming language), Haskell, Erlang (programming language), Java (programming language) |
| Influenced | Elixir (programming language), Hy (programming language) |
| Operating system | Cross-platform |
| License | Eclipse Public License |
| Website | https://clojure.org |
Clojure is a modern, dynamic dialect of the Lisp (programming language) family designed for robust software development. It emphasizes Functional programming principles, immutable Persistent data structures, and first-class support for Concurrent computing on the Java virtual machine. Created by Rich Hickey and supported by Cognitect, it interoperates seamlessly with the Java (programming language) ecosystem while introducing innovative approaches to state management and Parallel computing.
The language was conceived and developed by Rich Hickey, who announced its initial release in 2007 after several years of independent work. Hickey, influenced by his experiences with Lisp (programming language), Erlang (programming language), and the Java (programming language) platform, sought to create a pragmatic Lisp (programming language) for concurrent applications. The first stable version was released in 2009, with development and stewardship later supported by Hickey's consultancy, Cognitect. Key milestones include the creation of ClojureScript for JavaScript compilation and the establishment of the Clojure/conj annual conference, fostering its growing ecosystem.
A core tenet is its focus on Functional programming, promoting functions as first-class entities and encouraging the use of immutable data. It provides a sophisticated Software transactional memory system for managing shared, mutable state, a concept inspired by research in Concurrent computing languages like Haskell. The language is hosted, primarily on the Java virtual machine, allowing direct use of libraries from the Java (programming language) ecosystem, and also supports Common Language Runtime via ClojureCLR and compilation to JavaScript via ClojureScript. Its Persistent data structures provide efficient structural sharing, a technique discussed in works like Purely Functional Data Structures.
As a Lisp (programming language), it uses S-expressions and Homoiconicity, meaning code is represented using the language's own data structures, primarily lists. This facilitates powerful Macro (computer science) systems for Metaprogramming, akin to those found in Common Lisp and Scheme (programming language). The syntax is minimalist, with a small set of special forms like `def`, `if`, and `fn`, and relies heavily on its core library of functions. Dynamic typing is employed, with a REPL-driven development workflow that encourages interactive exploration, a tradition from earlier Lisp (programming language) environments like Interlisp.
The primary build and dependency management tool is Leiningen, which handles project automation and integrates with Maven repositories from the Java (programming language) world. For Integrated development environment support, many developers use Cursive for IntelliJ IDEA or Calva for Visual Studio Code. The Clojure CLI tools (`clj` and `clojure`) offer a more official, scriptable toolchain. The REPL is central to the workflow, often enhanced by libraries like nREPL for network-enabled interaction, and is supported in environments like Emacs via CIDER and Spacemacs.
The community gathers at events like Clojure/conj in North America and ClojureD in Europe, and collaborates online through forums and the ClojureScript Google Group. It has seen significant adoption in industries requiring robust data processing, notably at companies like Walmart, Apple, and Adobe. The language is used for a wide range of applications, from large-scale Distributed computing systems and Data science platforms at Netflix to Full-stack web development using frameworks like Luminus (web framework). Its principles have influenced other languages, including Elixir (programming language) and Julia (programming language).
Category:Lisp programming language family Category:Functional languages Category:JVM programming languages Category:Concurrent programming languages