This is information and links about the Clojure programming language. This reason for this document is mainly for myself so I don’t have to remember all of these details.
-
State and identity are not conflated
-
Usually everything you do in Clojure is immutable
-
That is usually not a problem thanks to structural sharing
-
When mutability really is required (no place oriented programming)
-
It means that usually a location in memory holding a location will not be changed after it is allocated. Place Oriented Programming is a form of premature optimization.
-
-
When you must have mutable stuff, that state can be managed really well:
-
Atoms
-
Agents
-
Refs and Software Transactional Memory
-
Locks
-
Future, Promise
-
CSP (core.async)
-
-
-
Dynamically typed (compile time) and strongly typed (run time) language makes for more readable code.
-
However, you can add type hints for performance reasons (static typing).
-
-
Code is data and data is code (homoiconicity)
-
Very clean code without much ceremony
-
You can do the same in C++ or Java. But is it less readable.
-
Downside of Clojure: it’s pretty strange coming from any mainstream imperative programming language.
Some thoughts on Component and Mount: https://yogthos.net/posts/2016-01-19-ContrastingComponentAndMount.html/ An application that used both Mount and Integrant: https://github.com/serioga/webapp-clojure-2020
-
Excellent introduction to Clojure: https://grison.me/2020/04/04/starting-with-clojure/
-
Building a Drug Dealer API
-
Hosted on the JVM: https://www.clojure.org
-
Hosted by JavaScript: https://clojurescript.org
-
Hosted by .Net runtimes (CLR): https://github.com/clojure/clojure-clr
-
-
Get Clojure from this Maven repository
-
-
-
Rest of the Clojure libraries can be found here
-
-
https://tirkarthi.github.io/clojure/2017/12/11/clj-tools-repl.html
-
-
Website for author of may Clojure libraries, ao: Integrant, Compojure and Duct. https://clojuredays.org/
-