r/Clojure • u/nephrenka • 1d ago
What Makes a Programming Language AI-First? My Case for Clojure
https://adamtornhill.substack.com/p/what-makes-a-programming-language
45
Upvotes
r/Clojure • u/nephrenka • 1d ago
17
u/Hostilian 1d ago •
I threw Claude at writing some Jank code a few weeks ago, mostly as an experiment, and it generated very tasteful Clojure code. Much moreso than the Typescript it poops out at my day job, which tends to be—for lack of a better concise descriptor—flabby. I was so impressed that when I finally get around to trying to build a couple of planned side-projects, I'll probably reach for some Clojure dialect first.
10
u/beders 1d ago
We are making the same observations over here in fintech land (deeply embedded in large regional bank):
Frontier language models spit out great Clojure code - adapting their code style to already existing pre-AI code - and have no trouble using multiple REPLs at the same time.
Changes across the stack (which includes Cljs) are created, run and tested quickly.
Even Copilot on Auto mode is doing a reasonably good job (Auto mode is cheaper).
I am wondering what people are adopting for multi-player mode: a mix of people and agents working on a larger feature/epic.
7
u/jaspingrobus 1d ago
I really enjoyed reading the post, but it left me wondering what would happen if the author tried something like Gleam/Elixir or even F#. I imagine he would still very much miss the interactive verification with REPL, but compile guarantess for static types feels like a pro for working with agents.
2
u/source-drifter 1d ago
about a month ago, i tried to integrate babaska into my harness flow. i was sick of getting code errors when bots build tooling and what not. it went horribly. bots are terrible at counting parens it seems. i'm working local models with consumer hardware, though. just to be clear.
5
u/red_hare 1d ago edited 1d ago
In retrospect, clojure would be a great agent language with the advent of "code mode" style tool calling (call code that calls tools rather than tools directly). Plus modern async handling.
5
u/yogthos 1d ago
Agree, and I'd argue the same features that help humans also help agents. For example, immutability as the default helps minimize the scope an LLM needs to track in order to make a change correctly. Clojure being concise and expressive also helps reduce the amount of tokens the LLM needs to use which directly shrinks the context. And nREPL driven workflow provides the agent with a fast feedback loop where it can try things and iterate step by step.
I also found it's helpful to add tooling for the LLM. I ended up making a jolt-metrics tool which tracks things like cyclomatic complexity, duplication, Halstead metrics, and so on, which helps with maintaining code quality, and spot a lot of questionable patterns. I also made jolt-lsp which provides a lot of tools similar to clj-kondo and an MCP, and a jolt-nrepl-mcp for the agent to drive the app using nREPL. And then I tied all of that together with jolt-skills that guide the agent towards using things as intended.
I find the results are better than I expected. I can now reliably build a working app like this in a day or so, something that would've taken months of work before.
1
u/Shadowys 1d ago
https://blog.danieltanfh.com/2026/09/conways-law-and-programming-languages
1
u/ertucetin 5h ago
I wish Anthropic and OpenAI would make a statement like, “We recommend using Lisps like Clojure for coding.” That could really boost the language’s visibility. :)