Clojure will affect the way you think about programming (2017)
https://eli.thegreenplace.net/2017/clojure-the-perfect-language-to-expand-your-brain/A History of Clojure by Rich Hickey https://dl.acm.org/doi/pdf/10.1145/3386321
https://youtu.be/P5eO7BNyJao?si=45zxrLUsY9AMUg6B
I feel like there was not enough fuss about what he showed off this year considering how many programmers (historically myself included) cared about checking/enforcing structure on a potentially nested thing, spec in usage has proved to be good for external boundaries but not great for internals
I remember we used to code something like:
class User { name age username password }
etc all the time but would end up having to make everything optional so that we could use the type hint against the age method and the auth method when we had partial information for the object
Obviously not an optimal design and can be broken down into yet more types and then composed together but I'm not a huge fan of object of object of object type situations — anyway my point is that Rich showed that we can just do the checks in context using deconstructing and in a reusable way rather than trying to declare a type once centrally and then cram that into everything else
I haven't explained it very well — I wanted to do a blog on it but just watch the video its one of the few things I got excited about even though I don't really code directly any more - the sad thing is current LLMs won't even use the technique because its not in their training sets and that still matters I've noticed for what they do
I've been a Clojure developer for over 10 years now, and this still surprises and thrills me.
Would an LLM, or a person solely coding using them, have had the insight to work out that immutability is the way to go, and we should revolutionize software develoment? If LLMs had happened 15 years ago, would all code still be "place oriented programming", with higher token counts and less reliability than we have today thanks to better practices we've learned in the recent past?
If so, what are we missing out on in the future, now that stopping and thinking about code is frowned upon?
Functional programming and immutable data structures are much older than Clojure
> If so, what are we missing out on in the future, now that stopping and thinking about code is frowned upon?
"We" here is vague. In truth, the vast majority of programmers just use whatever is most convenient at their place of work and do not participate in, nor care about, the advancement of the craft. That has always been true.
I imagine that, as we enter an age where many programmers don't even read code anymore, those people will largely stop caring about programming languages and paradigms entirely. But, a few will still have to. Similar to how most programmers nowadays don't think about allocation and memory management, but a few still have to.
And Rich didn't do what he did because he had to do it. He risked his own savings to go on this crusade, to make software development a happier place.
Who will take a risk like that in a world where no one writes code?
I actually just wrote about doing more clojure a few days ago
You're probably asking this rhetorically, but if you were seriously asking, this would be one of those riddle sentences like "This sentence is a lie." If somebody had an idea that they could articulate in natural language on this forum, the natural language would be something an LLM could process and turn into better code. Any true answer could make itself false.
What we'd miss out on if stopping and thinking about code was no longer a thing, would be ideas that stem from direct human experience. Language models relate words to words. There's a lot of power in that, way more than one would think, but they don't relate words to direct experience, except as described in other words. Innovation comes when humans express their direct experience in new natural language, that other humans can benefit from, and eventually language models benefit from.
Phrased differently: what would a language look like that’s optimized for LLMs?
Is anyone out there trying to find these wins?
Just look at how a system like LEAN allows LLMs to incrementally solve a problem. It absolutely wouldn’t get that far if it couldn’t rely on some type of compiler to verify things.
So yeah, a strong type system that allows lots of constraints to be expressed easily.
I think Haskell and Rust are much more “LLM-compatible” than Clojure.
And I say this as someone who has written Clojure full time for over half a decade.
As a side note: I code Clojure in Lightroom. It was so cool to see your code instantly evaluate and trace through your functions.
So you can do this when programming:
(m/=> foo [:=> [:cat :int] :int])
(defn foo [t] (inc t))
(foo 1)
[0]: https://github.com/typedclojure/typedclojure/tree/main/examp...And now, when I write all the code with agents, Clojure helps immensely with aligning agents’ code with what I want, with making sure I fully remain in control of all important behaviors of my code, with testing the agent-generated code, with troubleshooting running systems. Which probably means that Clojure is focused on delivering flexible complex production systems in general, not just human programmers’ ergonomics.
I try to use Rust whenever I can for small projects, but if I expect the system to be complex, I just have write it in Clojure, otherwise it would quickly get out of my control, and lose in performance and simplicity.
If you want to dive into Lisp, read Paul Graham’s book “ANSI Common Lisp”. It will show you the “why” and the concepts. Then learn Clojure for the syntax.
Even if you can never see yourself programming with Lots of Silly Parentheses (LiSP), the book is worth reading for the concepts. (And to imitate his writing style.)
For the insider the meme is that it's the same parens: instead of `function(a, b)` you move the open paren to the beginning: `(function a b)`.
Immutability is a much bigger hurdle for most newcomers.
Anyway I recommend trying out Clojure and enjoy.
Kind of feels like if someone never been exposed to Lisp before, not sure if they'd like it or not, "Hackers and Painters" (by the same author) is a better (non-technical) introduction to the "why's" of lisps. Less of a manual and more "high-level" about creative work in general.
- Clojure for functional programming (you mean you can update a bitmap in a purely functional way??)
- Array langauges (APL, BQN, J) for avoiding loops with matrix operations
- Prolog for avoiding loops with backtracking
MVP churn and AI fatigue is getting to me. Need some good Hammock Time!
Unfortunately it also left me with an extremely deep distaste for dynamic types, and in particular, the blind usage of lists and maps for everything. The ML family of languages finally gave me a paradigm worth keeping around.
Working professionally in dynamic languages, especially those that use maps in place of objects/records, I would spend a lot of time trying to figure out which keys were present in various input maps. Were they always available or only sometimes? I could either add verify checks at function callsites or trace the map all the way through my code and hope it didn't originate from an undocumented API response.
A few years ago, we started migrating our code from Elixir to Scala. That involved a lot of work creating case class "schemas" for many records that used to be represented by maps. But now it's clear at dev time what data each function receives as input. What fields are required and which are optional. I can write a quick bugfix in a large module that someone else wrote without spending a full day tracing data paths and looking at runtime traces.
With static types it's obvious and you generally have to work hard (and in non intuitive ways) to mess up.
This becomes more important as team sizes grow.
it's not blind, tho it could seem that way, and if someone hadn't thought deeply abut how they should use lists and maps, then it could be described as being blindly using them.
But this style is also what makes clojure dynamic, and flexible. Updates don't have to be rigid, and keeping backwards compatibility is a lot easier than a lot of statically typed languages.
That's not to say you can't have some rigidity where it's needed (specs for example, can be sprinkled in where you need/want it).
There isn’t much room for yet another framework or another way to work with data (I’m looking at you, Node.js), so there isn’t much to talk about or write articles about.
In other words, the efficiency and simplicity of the language act as a barrier to its spread in a world where only repeated mentions get through. IDK, maybe this is for the better after all.
Before people might ask questions and discuss things on obscure forums or subreddits. Now that LLMs are trained on all this data people no longer need to do that.
You just ask and LLM and get a throwaway answer that people generally trust as the best option.
Where do the new insights and opinion come from? Especially when LLMs start getting trained to recommend certain products.
The programming books from my youth and my classes in college were so completely invested in Java and OO (from page 1) that it's only with hindsight that I can recognize: They never EVER gave a motive for why solutions need to be modeled that way. It might've been something like "We don't have enough memory or CPU throughput these days to be constantly copying data and performing collections", but even that is just an argument for procedural programming.
My problem is:
a) this assumes that people can not have ideas without a programming languages. That's obviously incorrect. I can have ideas without knowing a programming language.
b) languages also constrain the thinking. For instance, in ruby you have a class and a module, as distinction. Is that a useful distinction? I think it is overlapping, with modules giving more flexibility. In practice, this distinction does not lead to many problems, but if you have: class Foo; module Bar; end; end and then you were to write "class Foo::Bar" in another file because you want to modify the code quickly, then ruby says you'd have to use "module Foo::Bar" instead, because the ruby parser already knew that this is a module, not a class. It is not a big problem, but whenever I run into this issue, I wonder why I need to care whether it is a class, or a module. Because, when I do so, such as adding a new method to that, perhaps from another namespace/project, then I wonder why ruby does not prioritize me wanting to change the code, but instead complains about that it is a module or a class. (I understand the ruby parser has to work that way, in order to differentiate between errors made or mixing up code, but my point of contention here is the "class versus module" distinction. The above is one example of many more that can be found in programming languages.
Of course you can reason that better programming languages typically lead to better implementations too. I'd reason in favour of such a statement. I don't really see the point of learning a language that is inferior to languages I already know, when I know I am not going to use that language. The "learn a new language every year" is not a bad idea, but why would I want to learn languages that are bad? That makes no sense. There is competition between languages, as well as against time.
Which is precisely why trying out languages built on different paradigms is a good way to widen the way you think about programming.
I mean, recently I saw Clojure for . Net and Clojure without JVM (forgot the name). If you don't need/want JVM, then why would you use Clojure over e.g. Common Lisp?
Clojure is a lisp-1 which, surprisingly, feels better to use than a lisp-2. Much more intuitive. (You can kind of also have a function call returning a function in the first position of a list and it just works. Common Lisp doesn’t like that at all and you need funcall or apply.)
The immutable data structures and better array and hashmap syntax and ergonomic hashmap argument destructuring remove a lot of mental overhead. Kind of like Python or JSON-in-Javascript.
Having slight syntax variation like square brackets for let bindings and one less level of nesting in let bindings makes it easier to read. Still homoiconic, though. So you get the best of both worlds.
The hygenic macros helped me design better anaphoric macros.
EDIT: typo
Hylang also had a good take on anaphoric macros in relation to threading macros. Clojure makes it more obvious that explicitly passing in the anaphoric symbol at the call-site is better for maintainability. This offers threading with arbitrary argument positions instead of forcing first or last position.
Clojure transducers finally broke the ice on common lisp series. The CL side of this is horrifying. SBCL seems to have dropped its sb-series contrib module. But it moved us far enough along that we now have parenscript-series. So upside all around.
Don’t know enough Fennel (Lua) or Elixir (Erlang) yet, to have any useful comments there.
Clojure makes stronger choices about the default style: immutable data, transformations over collections, and explicit tools for managing changing state.
Zooming out you're right: it's lisp and jvm is a difference. Zooming in and there are different ergonomics and incentives on how to structure the program.
In any case: Typescript has dynamic types and static types, it has true union types, it has hot reload (what you might call REPL), it has the widest package ecosystem and so much more. It works out of the box with the most popular IDE and you don't need to learn emacs.
I rarely hit the power ceiling of Typescript, so I never put in the work to learn Clojure.
I get that "hot reload" can feel similar, but it's not the same and is more limited for debugging, experimentation, extremely fast (sub-ms) iteration loops, etc.
Another thing you can't do is running/debugging tests without triggering more compilation. In a real repl language you drive things in-process, not from the outside with compilers and test runners.
Typescript is lovely btw, just have a go at other paradigms if you feel like it.
it allows you to "branch, work on a worktree, and merge" but unlike git worktrees you don't need to copy a complete clone of the data, you instead, like in the git object store, share most of it and only need memory for what you touch in your branch.
and your data only changes when _you_ decide to rebase, and merging partial work results is a _deliberate_ step, not something happening under your feet.
You don't need any inner working of clojure or any lower language for that matter. It's all available within your reach. Don't let the people who have built an identity over the tools that they have chosen, they can't give you any meaningful advice anymore with what we have as tools.
I'm saying this as someone who has worked with clojure for over a decade. There is no point in gate keeping things anymore. It also means that the point of clojure which is supposed to have a lot of DX built into it , is gone with LLMs.
Software is largely solved now and the only thing that matters now is distribution so start thinking about your product and how to market it.
They sound defensive and insecure, which I suspect is not the impression they are trying to create.
But they will be overtaken by those who use the LLM as a sparring partner to form their own understanding and elevate themselves.
I fear we will see a huge disparity between both groups. One ever on the rise while the other is left in the dust.
What tipped the scales for Clojure - Brendan Foote (Clojure/Conj 2026)
Outdated take post-slopocalypse. You still very much need to know how to program and will often get better results writing code yourself, as we have seen from the outages caused by people vibe coding shit.
> if you are still taking to heart what this article says you are working against the trend.
Being trendy is not synonymous with being correct. In this case the trend is stupid and making the profession worse, so one would be well advised to work against it.
> Software is largely solved now
If that were true, we would be getting a deluge of high quality software. Instead we are getting a deluge of crap. Software is by no means solved.
Much like how GPU were bodged onto the monolithic von Neumann CPU architectures, we may safely assume most "LLM" will be superseded by neuromorphic computing technology sooner of later. =3
perhaps this is the optimism i need today.