From Wikipedia, the free encyclopedia
Designed byRich Hickey
First appeared2007; 17 years ago (2007)
Stable release
1.11.2[8] / 8 March 2024; 2 months ago (2024-03-08)
Typing discipline
Memory managementGarbage collection via a host (JVM, CLR, a JavaScript runtime such as V8 in case of ClojureScript or BEAM (see below)
LicenseEclipse Public
Filename extensions
  • .clj
  • .cljs
  • .cljr
  • .cljc
  • .cljd
  • .edn
ClojureScript, ClojureDart
Influenced by

Clojure (/ˈklʒər/, like closure)[17][18] is a dynamic and functional dialect of the Lisp programming language on the Java platform.[19][20]

Like most other Lisps, Clojure's syntax is built on S-expressions that are first parsed into data structures by a reader before being compiled.[21][17] Clojure's reader supports literal syntax for maps, sets and vectors along with lists, and these are compiled to the mentioned structures directly.[21] Clojure treats code as data and has a Lisp macro system.[22] Clojure is a Lisp-1 and is not intended to be code-compatible with other dialects of Lisp, since it uses its own set of data structures incompatible with other Lisps.[22]

Clojure advocates immutability and immutable data structures and encourages programmers to be explicit about managing identity and its states.[23] This focus on programming with immutable values and explicit progression-of-time constructs is intended to facilitate developing more robust, especially concurrent, programs that are simple and fast.[24][25][17] While its type system is entirely dynamic, recent efforts have also sought the implementation of a dependent type system.[26]

The language was created by Rich Hickey in the mid-2000s, originally for the Java platform; the language has since been ported to other platforms, such as the Common Language Runtime (.NET). Hickey continues to lead development of the language as its benevolent dictator for life.


Rich Hickey, creator of Clojure

Rich Hickey is the creator of the Clojure language.[19] Before Clojure, he developed dotLisp, a similar project based on the .NET platform,[27] and three earlier attempts to provide interoperability between Lisp and Java: a Java foreign language interface for Common Lisp (jfli),[28] A Foreign Object Interface for Lisp (FOIL),[29] and a Lisp-friendly interface to Java Servlets (Lisplets).[30]

Hickey spent about two and a half years working on Clojure before releasing it publicly in October 2007,[31] 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 word play on the programming concept "closure" incorporating the letters C, L, and J for C#, Lisp, and Java respectively—three languages which had a major influence on Clojure's design.[18]


Rich Hickey developed Clojure because he wanted a modern Lisp for functional programming, symbiotic with the established Java platform, and designed for concurrency.[24][25][32][17] He has also stressed the importance of simplicity in programming language design and software architecture, advocating for loose coupling, polymorphism via protocols and type classes instead of inheritance, stateless functions that are namespaced instead of methods or replacing syntax with data.[33][34][35]

Clojure's approach to state is characterized by the concept of identities,[23] which are represented as a series of immutable states over time. Since states are immutable values, any number of workers can operate on them in parallel, and concurrency becomes a question of managing changes from one state to another. For this purpose, Clojure provides several mutable reference types, each having well-defined semantics for the transition between states.[23]

Clojure runs on the Java platform and as a result, integrates with Java and fully supports calling Java code from Clojure,[36][17] and Clojure code can be called from Java, too.[37] The community uses tools such as Clojure command-line interface (CLI)[38] or Leiningen for project automation, providing support for Maven integration. These tools handle project package management and dependencies and are configured using Clojure syntax.

As a Lisp dialect, Clojure supports functions as first-class objects, a read–eval–print loop (REPL), and a macro system.[6] Clojure's Lisp macro system is very similar to that of Common Lisp with the exception that Clojure's version of the backquote (termed "syntax quote") qualifies symbols with their namespace. This helps prevent unintended name capture, as binding to namespace-qualified names is forbidden. It is possible to force a capturing macro expansion, but it must be done explicitly. Clojure does not allow user-defined reader macros, but the reader supports a more constrained form of syntactic extension.[39] Clojure supports multimethods[40] and for interface-like abstractions has a protocol[41] based polymorphism and data type system using records,[42] providing high-performance and dynamic polymorphism designed to avoid the expression problem.

Clojure has support for lazy sequences and encourages the principle of immutability and persistent data structures. As a functional language, emphasis is placed on recursion and higher-order functions instead of side-effect-based looping. Automatic tail call optimization is not supported as the JVM does not support it natively;[43][44][45] it is possible to do so explicitly by using the recur keyword.[46] For parallel and concurrent programming Clojure provides software transactional memory,[47] a reactive agent system,[1] and channel-based concurrent programming.[48]

Clojure 1.7 introduced reader conditionals by allowing the embedding of Clojure, ClojureScript and ClojureCLR code in the same namespace.[49][21] 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.[50][51][52]

Extensible Data Notation[edit]

Extensible Data Notation, or edn,[53] 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 to JSON or XML, but has a relatively large list of built-in elements, shown here with examples:

  • booleans: true, false
  • strings: "foo bar"
  • characters: \c, \tab
  • symbols: name
  • keywords: :key
  • integers: 123
  • floating point numbers: 3.14
  • lists: (a b 42)
  • vectors: [a b 42]
  • maps: {:a 1, "foo" :bar, [1 2 3] four}
  • sets: #{a b [1 2 3]}
  • 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 {:first "Fred" :last "Mertz"}, 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[edit]

The primary platform of Clojure is Java,[20][36] but other target implementations exist. The most notable of these is ClojureScript,[54] which compiles to ECMAScript 3,[55] and ClojureCLR,[56] a full port on the .NET platform, interoperable with its ecosystem.

Other implementations of Clojure on different platforms include:

  • Babashka,[57] Native Clojure scripting language leveraging GraalVM native image and Small Clojure Interpreter
  • CljPerl,[58] Clojure on Perl
  • ClojureDart,[59] Extend Clojure's reach to mobile & desktop apps by porting Clojure to Dart and Flutter
  • Clojerl,[60] Clojure on BEAM, the Erlang virtual machine
  • basilisp,[61] A Clojure-compatible(-ish) Lisp dialect targeting Python 3.8+
  • ClojureRS,[62] Clojure on Rust
  • Ferret,[63] compiles to self-contained C++11 that can run on microcontrollers
  • jank,[64] Native Clojure hosted in C++ on an LLVM-based JIT
  • Joker,[65] an interpreter and linter written in Go
  • Las3r,[66] a subset of Clojure that runs on the ActionScript Virtual Machine (the Adobe Flash Player platform)
  • Pixie,[67] Clojure-inspired Lisp dialect written in RPython
  • Rouge,[68] Clojure on YARV in Ruby


Tooling for Clojure development has seen significant improvement over the years. The following is a list of some popular IDEs and text editors with plug-ins that add support for programming in Clojure:[69]

In addition to the tools provided by the community, the official Clojure command-line interface (CLI) tools[38] have also become available on Linux, macOS, and Windows since Clojure 1.9.[83]


The development process is restricted to the Clojure core team, though issues are publicly visible at the Clojure JIRA project page.[84] Anyone can ask questions or submit issues and ideas at[85] 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.[86][87]


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,[88][89][90] Eric Evans,[91][92] James Gosling,[93] Paul Graham,[94] and Robert C. Martin.[95][96][97][98] ThoughtWorks, while assessing functional programming languages for their Technology Radar[99], described Clojure as "a simple, elegant implementation of Lisp on the JVM" in 2010 and promoted its status to "ADOPT" in 2012.[100]

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".[101] Clojure is used in industry by firms[102] such as Apple,[103][104] Atlassian,[105] Funding Circle,[106] Netflix,[107] Nubank,[108] Puppet,[109] and Walmart[110] as well as government agencies such as NASA.[111] It has also been used for creative computing, including visual art, music, games, and poetry.[112]

In the 2023 edition of Stack Overflow 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 was desired by 40.15% of the developers participating in the survey.[113] It could possibly be attributed to limited professional opportunities for Clojure developers with just over 50 search results for "Clojure developer" at the U.S. section of Indeed, as of May 2024.[114]

Release history[edit]

Version Release date Major features, improvements
October 17, 2007 (2007-10-17)[31] Initial public release
1.0 May 4, 2009 (2009-05-04)[115] First stable release
1.1 December 31, 2009 (2009-12-31)[116] Futures
1.2 August 19, 2010 (2010-08-19)[117] Protocols
1.3 September 23, 2011 (2011-09-23)[118] Enhanced primitive support
1.4 April 15, 2012 (2012-04-15)[119] Reader literals
1.5 March 1, 2013 (2013-03-01)[120] Reducers
1.5.1 March 10, 2013 (2013-03-10)[121] Fixing a memory leak
1.6 March 25, 2014 (2014-03-25)[122] Java API, improved hashing algorithms
1.7 June 30, 2015 (2015-06-30)[49] Transducers, reader conditionals
1.8 January 19, 2016 (2016-01-19)[123] Additional string functions, direct linking, socket server
1.9 December 8, 2017 (2017-12-08)[124] Integration with spec, command-line tools
1.10 December 17, 2018 (2018-12-17)[125] Improved error reporting, Java compatibility
1.10.1 June 6, 2019 (2019-06-06)[126] Working around a Java performance regression and improving error reporting from clojure.main
1.10.2 January 26, 2021 (2021-01-26)[127] Java interoperability/compatibility improvements and other important language fixes
1.10.3 March 4, 2021 (2021-03-04)[128] prepl support for reader conditionals
1.11.0 March 22, 2022 (2022-03-22)[129] 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)[130] Rolling back unintended change in binary serialisation of objects of types clojure.lang.Keyword and clojure.lang.ArraySeq.
Current stable version: 1.11.2 March 8, 2024 (2024-03-08)[8] Fix for CVE-2024-22871 Denial of Service vulnerability
Old version
Older version, still maintained
Latest version
Latest preview version
Future release

See also[edit]


  1. ^ a b "Agents and Asynchronous Actions". Retrieved 2019-07-07.
  2. ^ "Concurrent Programming". Retrieved 2019-07-07.
  3. ^ Hickey, Rich; contributors. "core.async". GitHub. Retrieved 2019-07-07.
  4. ^ "Functional Programming". Retrieved 2019-07-07.
  5. ^ Nolen, David; Hickey, Rich. "core.logic". GitHub. Retrieved 2019-07-07.
  6. ^ a b "Macros". Retrieved 2019-07-07.
  7. ^ Esterhazy, Paulus. "Threading Macros Guide". Retrieved 2019-07-07.
  8. ^ a b Miller, Alex (2024-03-08). "Clojure 1.11.2 release".
  9. ^ Fogus, Michael (2011). "Rich Hickey Q&A". Archived from the original on 2017-01-11.
  10. ^ Hickey, Rich (2011). "Simple Made Easy". YouTube. {{cite web}}: Unknown parameter |note= ignored (help)
  11. ^ Bonnaire-Sergeant, Ambrose (2012). A Practical Optional Type System for Clojure (Thesis). The University of Western Australia.
  12. ^ "Clojure Programming" (PDF). Retrieved 2013-04-30.
  13. ^ Hickey, Rich. "Clojure Bookshelf". Archived from the original on 2017-10-03. Retrieved 2019-07-07.
  14. ^ Rose, Calvin; contributors. "Janet Language". Retrieved 2023-02-18.
  15. ^ Baldridge, Timothy. "Pixie". Retrieved 2019-07-07.
  16. ^ Ramachandra, Ramkumar. "Rhine". GitHub. Retrieved 2019-07-07.
  17. ^ a b c d e Edwards, Kathryn (2009-08-10). "The A-Z of Programming Languages: Clojure". Archived from the original on 2019-08-26.
  18. ^ a b Hickey, Rich (2009-01-05). "meaning and pronunciation of Clojure".
  19. ^ a b Krill, Paul (2012-03-22). "Clojure inventor Hickey now aims for Android".
  20. ^ a b "Clojure". Retrieved 2019-07-07.
  21. ^ a b c "The Reader". Retrieved 2019-07-07.
  22. ^ a b "Differences with other Lisps". Retrieved 2019-07-07.
  23. ^ a b c "Values and Change: Clojure's approach to Identity and State". Retrieved 2019-07-07.
  24. ^ a b Hickey, Rich. "Rationale". Retrieved 2019-07-07.
  25. ^ a b Torre, Charles (2009-10-06). "Expert to Expert: Rich Hickey and Brian Beckman – Inside Clojure".
  26. ^ "clojure/spec.alpha". GitHub. 2017-04-26.
  27. ^ Hickey, Rich (2002-10-16). "[ANN] dotLisp: A Lisp dialect for .Net".
  28. ^ Hickey, Rich (2013-04-15). "jfli".
  29. ^ Hickey, Rich (2013-04-03). "foil: Foreign Object Interface for Lisp".
  30. ^ Hickey, Rich (2013-03-07). "Lisplets".
  31. ^ a b Hickey, Rich (2020-06-12). "A history of Clojure". Proceedings of the ACM on Programming Languages. 4 (HOPL): 1–46. doi:10.1145/3386321. S2CID 219603760.
  32. ^ Elmendorf, Dirk (2010-04-01). "Economy Size Geek – Interview with Rich Hickey, Creator of Clojure".
  33. ^ "Simple Made Easy". InfoQ. Retrieved 2024-05-02.
  34. ^ "(iterate think thoughts): Advantages of Data Oriented Programming". Retrieved 2024-05-02.
  35. ^ "talk-transcripts/Hickey_Rich/ at master · matthiasn/talk-transcripts". GitHub. Retrieved 2024-05-02.
  36. ^ a b "Hosted on the JVM". Retrieved 2019-07-07.
  37. ^ "Java Interop". Retrieved 2019-07-07.
  38. ^ a b Miller, Alex. "Deps and CLI Guide". Retrieved 2019-07-08.
  39. ^ Hickey, Rich. "edn". GitHub. Retrieved 2019-07-07.
  40. ^ "Multimethods and Hierarchies". Retrieved 2019-07-07.
  41. ^ "Protocols". Retrieved 2019-07-07.
  42. ^ "Datatypes: deftype, defrecord and reify". Retrieved 2019-07-07.
  43. ^ Goetz, Brian (2014-11-20). "Stewardship: the Sobering Parts".
  44. ^ Rose, John (2007-07-12). "tail calls in the VM".
  45. ^ Rose, John (2009-02-11). "Some languages need to be able to perform tail calls".
  46. ^ "Special Forms". Retrieved 2019-07-07.
  47. ^ "Refs and Transactions". Retrieved 2019-07-07.
  48. ^ Hickey, Rich (2013-06-28). "Clojure core.async Channels".
  49. ^ a b Miller, Alex (2015-06-30). "Clojure 1.7 is now available".
  50. ^ Hickey, Rich (2014-09-17). "Transducers".
  51. ^ Hickey, Rich (2014-08-06). "Transducers are Coming".
  52. ^ Hickey, Rich (2014-11-20). "Inside Transducers".
  53. ^ "Official EDN Spec". 2022-04-27.
  54. ^ "ClojureScript". Retrieved 2019-07-06.
  55. ^ "ClojureScript – FAQ (for JavaScript developers)". Retrieved 2018-02-04.
  56. ^ "ClojureCLR". GitHub. Retrieved 2012-06-28.
  57. ^ Borkent, Michiel. "Babashka". Retrieved 2019-08-19.
  58. ^ Hu, Wei. "A Lisp on Perl". Retrieved 2019-07-06.
  59. ^ "What is ClojureDart?", GitHub, Tensegritics, 2022-12-16, retrieved 2022-12-16
  60. ^ Facorro, Juan. "Clojerl". GitHub. Retrieved 2019-07-06.
  61. ^ "basilisp". GitHub. Retrieved 2024-05-13.
  62. ^ "ClojureRS". GitHub. Retrieved 2022-03-17.
  63. ^ Akkaya, Nurullah. "Ferret". Retrieved 2019-07-06.
  64. ^ Wilkerson, Jeaye. "jank". Retrieved 2022-08-17.
  65. ^ Bataev, Roman. "Joker". Retrieved 2019-07-06.
  66. ^ Cannon, Aemon. "Laz3r". GitHub. Retrieved 2019-07-06.
  67. ^ Baldridge, Timothy. "Pixie". Retrieved 2019-07-06.
  68. ^ Connor, Ashe. "Rouge". GitHub. Retrieved 2019-07-06.
  69. ^ Miller, Alex (2019-02-04). ""State of Clojure 2019" Results".
  70. ^ Batsov, Bozhidar; contributors. "CIDER: The Clojure Interactive Development Environment that Rocks". Retrieved 2019-07-05.
  71. ^ Fleming, Colin. "Cursive: Provides full Clojure and ClojureScript language support". Retrieved 2019-07-05.
  72. ^ Prokopov, Nikita. "Clojure Sublimed". Retrieved 2023-02-18.
  73. ^ Helenius, Eero. "Tutkain". Retrieved 2023-02-18.
  74. ^ Pope, Tim. "fireplace.vim: Clojure REPL Support". Retrieved 2019-07-05.
  75. ^ Monroe, Dominic (2016-12-13). "Clojure and Vim: An overview – It's very possible".
  76. ^ Masashi, Iizuka (2024-04-29). "vim-elin: A Clojure development environment for Vim/Neovim, primarily written in Babashka". GitHub. Archived from the original on 2024-05-02. Retrieved 2024-05-02.
  77. ^ Caldwell, Oliver. "Neovim Clojure(Script) tooling over prepl". GitHub. Retrieved 2019-11-09.
  78. ^ Caldwell, Oliver (2019-11-06). "Getting started with Clojure, Neovim and Conjure in minutes".
  79. ^ Strömberg, Peter. "Calva: Clojure & ClojureScript Interactive Programming". Retrieved 2019-07-05.
  80. ^ Szabo, Maurício. "Clover". Retrieved 2021-01-28.
  81. ^ clj-kondo/clj-kondo, clj-kondo, 2024-04-30, retrieved 2024-05-02
  82. ^ "Overview - Clojure LSP". Retrieved 2024-05-02.
  83. ^ Miller, Alex (2017-12-08). "Clojure 1.9".
  84. ^ "Clojure". Retrieved 2019-07-07.
  85. ^ "Clojure Forum". Retrieved 2020-03-20.
  86. ^ Hickey, Rich (2018-11-26). "Open Source is Not About You". GitHub.
  87. ^ "Workflow". Retrieved 2019-07-07.
  88. ^ Goetz, Brian (2020-05-24). "Brian Goetz' favorite non-Java JVM language (Part 1 of 3)".
  89. ^ Goetz, Brian (2020-05-24). "Brian Goetz' favorite non-Java JVM language (Part 2 of 3)".
  90. ^ Goetz, Brian (2020-05-24). "Brian Goetz' favorite non-Java JVM language (Part 3 of 3)".
  91. ^ Evans, Eric (2018-08-14). "Modelling Time: Eric Evans: Domain-Driven Design Europe 2018".
  92. ^ Evans, Eric (2014-11-21). "Eric Evans on Twitter".
  93. ^ "James Gosling meetup with London Java Community". 2016-10-11.
  94. ^ Graham, Paul (2016-05-06). "Paul Graham on Twitter".
  95. ^ Martin, Robert (2019-08-22). "Why Clojure?".
  96. ^ Martin, Robert (2018-11-29). "Unble Bob Martin on Twitter".
  97. ^ Martin, Robert (2018-08-01). "Introduction To Functional Programming".
  98. ^ Martin, Robert (2017-07-11). "Pragmatic Functional Programming".
  99. ^ "Technology Radar | An opinionated guide to today's technology landscape". Thoughtworks. Retrieved 2024-05-20.
  100. ^ "Technology Radar: Clojure". Retrieved 2019-02-10.
  101. ^ Maple, Simon; Binstock, Andrew (2018-10-17). "JVM Ecosystem Report 2018".
  102. ^ "Success Stories". Retrieved 2018-10-27.
  103. ^ Liutikov, Roman (2017-12-17). "Roman Liutikov on Twitter".
  104. ^ "Jobs at Apple". Retrieved 2019-07-06.
  105. ^ Borges, Leonardo (2015-07-07). "Realtime Collaboration with Clojure".
  106. ^ Pither, Jon (2016-10-04). "Clojure in London: Funding Circle – Lending some Clojure".
  107. ^ Williams, Alex (2014-08-03). "The New Stack Makers: Adrian Cockcroft on Sun, Netflix, Clojure, Go, Docker and More".
  108. ^ "Nubank adquire empresa norte-americana de tecnologia Cognitect". 23 July 2020.
  109. ^ Price, Chris (2014-04-11). "A New Era of Application Services at Puppet Labs". Retrieved 2020-08-06.
  110. ^ Phillips, Marc (2015-07-14). "Walmart Runs Clojure at Scale".
  111. ^ "Common-Metadata-Repository". GitHub. Retrieved 2019-07-06.
  112. ^ Meier, Carin (2015-05-06). "Creative computing with Clojure".
  113. ^ "Stack Overflow Developer Survey 2023". Stack Overflow. Retrieved 2024-05-02.
  114. ^ ""Clojure developer" search results at [Archived due to the mutability of the source]". 2024-05-02. Retrieved 2024-05-02.
  115. ^ Hickey, Rich (2009-05-04). "Clojure 1.0".
  116. ^ Hickey, Rich (2009-12-31). "Clojure 1.1 Release".
  117. ^ Hickey, Rich (2010-08-19). "Clojure 1.2 Release".
  118. ^ Redinger, Christopher (2011-09-23). "[ANN] Clojure 1.3 Released".
  119. ^ Dipert, Alan (2012-04-17). "[ANN] Clojure 1.4 Released".
  120. ^ Halloway, Stuart (2013-03-01). "ANN: Clojure 1.5".
  121. ^ Halloway, Stuart (2013-03-10). "Clojure 1.5.1".
  122. ^ Miller, Alex (2014-03-25). "[ANN] Clojure 1.6".
  123. ^ Miller, Alex (2016-01-19). "Clojure 1.8 is now available".
  124. ^ Miller, Alex (2017-12-08). "Clojure 1.9 is now available".
  125. ^ Miller, Alex (2018-12-17). "Clojure 1.10 release".
  126. ^ Miller, Alex (2019-06-06). "Clojure 1.10.1 release".
  127. ^ Miller, Alex (2021-01-26). "Clojure 1.10.2 release".
  128. ^ Miller, Alex (2021-03-04). "Clojure 1.10.3 release".
  129. ^ Miller, Alex (2022-03-22). "Clojure 1.11.0 release".
  130. ^ Miller, Alex (2022-04-05). "Clojure 1.11.1 release".

Further reading[edit]

External links[edit]

1958 1960 1965 1970 1975 1980 1985 1990 1995 2000 2005 2010 2015 2020
 LISP 1, 1.5, LISP 2(abandoned)
 Lisp Machine Lisp
 Scheme  R5RS  R6RS  R7RS small
 ZIL (Zork Implementation Language)
 Franz Lisp
 Common Lisp  ANSI standard
 Le Lisp
 MIT Scheme
 Chez Scheme
 Emacs Lisp
 PLT Scheme  Racket
 GNU Guile
 Visual LISP