by ghuntley · 1y ago · 0 comments
I do however agree that there’s langs that are not as suitable for LLMs (Java) due to their verbosity (and engineers sort classes onto filesystem like a filing drawer. LLMs work best when everything for a domain, including tests, is in a single file).
Increased verbosity of the grammar does yield token wastage/ineffectiveness.
Having said all that - compile time matters HEAPS. The faster you can optimise your compile time the more loops (throwing pancakes at the wall) you can do. Here’s where it gets crazy though, one can loop a verbose compilation w/metrics back into the LLM and ask the LLM to propose improvements on how to make the compile faster. It works…
> LLMs work best when everything for a domain, including tests, is in a single file
Context management goes a long way to getting better results from LLMs (why I still like Aider over more agentic tools) and this gives you less flexibility to compose the context yourself based on what’s important to a given task.
Some languages do this much better than others.
I'd also add that code readability goes a long way too. Rust compiler has better checks than Go, but when LLMs make mistakes it's a lot easier to identify and fix generated Go code than Rust.
So the balance between verbosity and readability is important too, in addition to soundness checks. Java and Go are both verbose, but Go is intentionally designed for readability.
And compile time as already mentioned. Go wins there too.
All of these help together to iterate faster with fast and often subtly wrong generated code. LLMs will continue to be less wrong as the available training samples increase over time. That's something for the future to see what wins there.
That’s most Chad pattern I’ve discovered so far…