In 2007, an ambitious Rich Hickey introduced Clojure to the public. This programming language was a result of Hickey’s desire to create a Lisp language that, unlike other languages at the time, had a combination of a few things—defaulted to utilizing immutable data structures, was compatible with the JVM (Java Virtual Machine), and that incorporated concurrency.
Clojure is many things, including dynamic, compiled, and general-purpose. Major corporations such as Walmart and Amazon use it in their systems. One important element to Clojure is that it is part of the Lisp family. Lisp is defined as a group of programming languages based on mathematical notations. Clojure itself utilizes some of the Lisp features like its incorporation of parentheses and an abstract syntax tree.
Benefits of Clojure
- Utilizes Functional Programming (FP)
- Isolates side effects
- Data is immutable by default
- Declarative-based coding
This is when data types are processed inside a uniform interface. It works with Object-Oriented Programming (OOP) languages, multimethods, and protocols as well. Clojure supports this development tool, allowing it to write functions that can be used in many different data types.
Hickey wanted Clojure to be concurrent-friendly, or to be able to process various tasks at one time, to decrease development time. In order to support this as much as possible, Clojure has a Software Transactional Memory, or STM, dynamic components which separate state changes inside threads, and allow for synchronous—as well as asynchronous—manipulation.
More technical, specific functions of Clojure—how it handles polymorphism, side effects, and Functional Programming—further separate it from languages like Java and Python. Even in modern technological society, Clojure is, in many ways, still very unique. While other languages do have the general quirks that make them better suited for certain projects over others, Clojure can be viewed a step further through its technical features.
One thing won’t change when deciding what programming language to use for a development project—the need to identify which language is the better fit. Maybe it could be Clojure, or it might be a more general programming language.