| ▲ | superdisk 3 hours ago | |
Hmm, I think the opposite. Clojure is very much a human-first language. It's all very "elegant" and fun to write, at the expense of the machine, and thus is very slow. That's the tradeoff you make. LLMs can spit out mountains of boring old C++ without issue, so having them write Clojure is kinda the worst of both worlds. | ||
| ▲ | weavejester 2 hours ago | parent [-] | |
Optimized Clojure is on par with Java in terms of performance, which isn't hugely slower than C++. More idiomatic Clojure is less performant, but typically you'll optimize the hot paths. The main advantage Clojure has in LLM use is that it has a good REPL. LLMs are quite fast at writing code; the bottleneck is often the time it takes to compile and test that code, which is higher for most compiled languages than it is for an open REPL. A LLM writing Clojure typically has a faster iteration loop than one writing C++. And while I have no hard evidence of this, I also wonder if Clojure's general design philosophy of reducing complexity (i.e. interconnectivity) is also a benefit for LLMs. My experience is that LLMs tend to be more effective the more isolated and unconnected a piece of code is, which Clojure is specifically designed around. | ||