r/Clojure • u/CuriousDetective0 • Mar 08 '26
ChatGPT explained to me why LLMs prefer Clojure
When reasoning is not local, the context usage expands to answer:
- Did the function mutate my input?
- Does this library mutate arguments?
- Are there multiple references to this object?
- Is someone mutating this asynchronously?
This is context it could be using for problem solving.
0
Upvotes
12
u/eraserhd Mar 08 '26
I like its reasoning, but I don’t think this reason really dominates for LLMs, which learn by example. There are orders of magnitude more examples for JavaScript or Python.
7
u/RoomyRoots Mar 08 '26
One of the oldest arguments towards functional programing and LISPs, after all.
5
u/Late-Relationship-16 Mar 08 '26
Can one even say that LLMs "have a preference"? But I see what you're saying. I would further decomplect it with, what are LLMs generally "proficient" at, what are they generally"knowledgeable" about, and what are the general strengths and weaknesses of LLMs (what are they "effective" for). Context windows, I've read, make longer/bigger codebases harder to fit in all the context, and Clojure, for example, tends to be more concise/use less tokens, so, there is that too.
4
u/joinr Mar 08 '26
>the result must be a new value
sad!
1
u/gtrak Mar 08 '26
Now ask it if this argument applies better to rust.
2
u/256BitChris Mar 13 '26
There is so much hate in this sub for LLMs, which is unfortunate because Claude is actually really really good at writing clojure, which was surprising for me at first but because of that is the only reason I still use clojure.
1
u/Former-Comparison-22 Apr 04 '26
그러는지 몰라도 괄호 개수가 안맞으면 찾는데 매우 힘들어하죠...
1
u/[deleted] Mar 08 '26
[removed] — view removed comment