Live data from Hacker News

Use boring languages with LLMs

jry.io

11–20 of 180 posts

Re: Use boring languages with LLMs

#11
post #2

Contradictory anecdote: there’s basically only one way to write Elm, as it is a very trend-resistant language with minimal updates over long timespans, but most agents in my experience will throw Haskell syntax and Prelude functions into their Elm output. Compiler or LSP will often set them right but they still try it initially

I’ve just started a new app with an Elm frontend. I’m using Grok Build, and it integrates really well.

The compiler is incredibly helpful because it catches errors and gives clear explanations and the LLM can iterate over it. I’ve also added the elm-review package with the default configuration, which is fantastic for ensuring code quality.

Re: Use boring languages with LLMs

#12

Has Go become a "boring language"?

Become? Always has been.

It was intentionally designed for programmers with limited skill.

Go language creator Rob Pike:

> The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt.

Re: Use boring languages with LLMs

#13
I disagree. "Boring" languages leave a lot of assumptions in code, which will start to compound the more changes model (and programmers) make to the code.

The more assumptions I can move to compile time the better models are at dealing with emerging complexity.

I would go the other way with LLMs and I wish for liquid types and effects in Rust to make type specifications even more strict.

P.S. effects and liquid types and type specifications in general add a lot of busywork, but models have higher level of tolerance to busywork compared to developers.

Re: Use boring languages with LLMs

#14
> Languages and ecosystems with low variance in their training corpus are represented better and executed more reliably by coding agents.

So I think the author is saying that go is a simple language that tends to have less solutions to the same problem. I personally agree to that to a degree.

What I don't agree on is that we can choose what "low variance" is. There is a lot of go code out there, it's shape may have little "noise", but the variance is massive.

Re: Use boring languages with LLMs

#15
I agree with the idea that boringly predictable should be what is preferred but anecdotally my experience in using Go with LLMs is that they trip up a lot on the races and locking from go’s thread model. I haven’t seen the same problem in rust which is now why I’m doing all my LLM work for tooling in rust.

The parallelism issue in particular was also not something I noticed agent struggling with in JavaScript, although JavaScript concurrency model is clearly fundamentally different.

The concurrency issues that I saw LMM‘s face was one reason why I created freelang which uses a very boring and audible concurrency model of OS processes that use the file system to talk instead of IPC, shared state, or anything like that. Higher overhead, lower throughput, but more boring and hopefully less bugs: https://github.com/DO-SAY-GO/freelang

Re: Use boring languages with LLMs

#16
post #2

Contradictory anecdote: there’s basically only one way to write Elm, as it is a very trend-resistant language with minimal updates over long timespans, but most agents in my experience will throw Haskell syntax and Prelude functions into their Elm output. Compiler or LSP will often set them right but they still try it initially

I do agentic Elm development every day (it's my job). I feel like what you describe was a problem with models perhaps two years ago. Today's models don't seem to struggle with it at all and in fact do seem to benefit from what the author describes.

Re: Use boring languages with LLMs

#17
I wonder if the training data for some languages has higher quality code. I can imagine some niche languages having a higher standard than, for example Python, which surely has a bunch of random buggy scripts in the mix.

On the other hand, even if that were true, I don’t know how important it would actually be since LLMs can generalise across languages well.

It might be best to pick languages where it’s just harder to screw up, the canonical example being to prefer typescript over JavaScript.

Re: Use boring languages with LLMs

#18

Has Go become a "boring language"?

Become? Always has been. It was intentionally designed for programmers with limited skill. Go language creator Rob Pike: > The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build goo…

> They’re not capable of understanding a brilliant language

What a coincidence, since Rob Pike wasn't capable of designing a brilliant language.

Re: Use boring languages with LLMs

#19
I program in two languages: Swift (my main language), for client work, and PHP, for backend work. It’s overwhelmingly Swift.

In the last year or so, I have been using LLMs, to assist my work, with generally, excellent results.

I have noticed that the LLM delivers much better PHP, than Swift. I seldom need to rewrite or correct, the PHP code I get from it, and am constantly correcting the Swift. Part of the reason, may be that I am a much better Swift programmer, than PHP programmer, and there’s just a lot more Swift code. I haven’t really taken the time to analyze it.

I have my theories, as to why, but it’s not something I’m really into researching. I’ve just noted the trend.

Re: Use boring languages with LLMs

#20

I program in two languages: Swift (my main language), for client work, and PHP, for backend work. It’s overwhelmingly Swift. In the last year or so, I have been using LLMs, to assist my work, with generally, excellent results. I have noticed that the LLM delivers much better PHP, than Swift. I seldom need to rewrite or correct, the PHP code I get from it, and am constantly correcting the Swift. Part of the reason, ma…

I think it's pretty simple - there's just so much more open source PHP code out there in the LLM's training dataset. Swift has been around for much less, and most Swift is closed-source - not that many years have passed since Swift has been able to run on non-Apple platforms, too.
Post reply on HN