Hacker News new | ask | show | jobs
by RussianCow 22 days ago
That's not why Elm is an ideal language for LLMs: it's because, if it compiles, it's most likely working software. Agentic workflows have gotten significantly better over the last year, so LLMs using languages like Elm, Haskell, or even Rust have an amazing feedback loop where even lower quality models can keep trying until things compile.
1 comments

can keep failing til you're tired of having the agent running in loops, as I said it doesn't matter, agent tools are more effective with models trained with a lot of elm examples
Yet Elm due to its simplicity does not need a lot of examples. Language itself is small and blessed way to architecture things consist of few patterns. Then things are composable. This is ideal for LLMs.

The price for that is verbosity. What in other languages are hidden behind async and complicated libraries in Elm has to be done explicitly resulting in boilerplate. But that is never a problem for LLMs.

Then Elm compiler has one of the best error messages. This helps agents a lot.

Then Time Machine debugger is another big help for agents as they have access to the full execution trace of the program. The trace is much smaller than would be necessary for other languages and typically fits into content window.

> Yet Elm due to its simplicity does not need a lot of examples

But does the neural net ;)