Aren’t these abstractions mostly meant to make reasoning about code easier for humans, and wouldn’t LLMs optimize for easy reasoning for LLMs?
Phrased differently: what would a language look like that’s optimized for LLMs?
This comes down to the question of how much LLM reasoning differs from human reasoning qualitatively. Maybe for the most part reasoning is just reasoning, so most things that help for human reasoning also help for LLM reasoning, and vice versa.
That's a good question. I do think that for example immutability is easier for LLMs as well, since it reduces the required amount of context for any give part of the software. But there might be even bigger wins out there for LLMs.
Is anyone out there trying to find these wins?
Well answering my own question, but I think a strong type system with clear error messages is extremely useful for an LLM.
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.
Oh, absolutely. LLMs thrive with problems that are easy to verify. They don't always get it right, but the number of attempts they can do in a short time more than covers for it if verification is fast. Type systems are great for this.