I left the previous article with a question. Why did I come back to Clojure last year, and decide that it was probably my favourite general purpose programming language?
I’ll be clean up front – although I love the language, it’s an open relationship. It’s not my language at work. It’s not my only language in my spare time. But it is the language that I reach for when coding up something new, or investigating something.
So why do I keep coming back to Clojure? It’s not the perfect language, but it does have the X-factor for me. For this post, I’ll focus on two features, which aren’t completely technical.
- The community.
- The culture.
For a small project, I’ve been taken by how vibrant, smart, and productive the Clojure community is.
This isn’t an elitist community. There’s a genuine feeling that the Clojure idioms are no harder than others, and the problem is more often one of familiarity. There are excellent efforts, such as Clojure Bridge, which are demonstrating that Clojure is an excellent teaching language for computer science concepts.
This isn’t a closed community. Because the majority of people involved will be doing something else in their day jobs, there’s a rich cross pollination.
This is a community that people are excited to be involved in.
This is a really interesting one, and something that is not readily apparent on first entering the language. It’s not apparent in the terse description of Clojure as a lisp for the JVM.
It’s not apparent when first wading through Clojure syntax in a basic tutorial. Maybe you skimmed over Rich Hickey’s rationale, and picked out ‘lisp’, ‘JVM’, ‘concurrency’, check, check, check.
Clojure is a well thought out language.
It has a winning mixture of practicality, and trail blazing when it looks like there’s a genuine benefit.
- It’s a hosted language, with excellent interoperability with the host.
- The libraries and build tools are excellent – it’s not a second class citizen.
- There’s a continual focus on this being a practical language, for real problems, and compromises are made for this.
- It’s a lisp!
- Moreover – it’s a new lisp, evolved from previous incarnations.
- Well thought-out concurrency primitives – Atoms, Agents, and Refs.
- Adoption of channel based asynchronous workflows. (Similar to Go).
- Spec – not typing, not a schema.
- Transducers – rethinking the traditional functional pipelines.
I’m not sure how significant the last two will be, or how widely adopted they will be, but it’s exciting to see these new ideas being rolled out as part of a language.
The team developing Clojure have obviously had a lot of hammock time.