They're particularly bad about concurrent go code, in my experience - it's almost always tutorial-like stuff, over-simplified and missing error and edge case handling to the point that it's downright dangerous to use... but it routinely slips past review because it seems simple and simple is correct, right? Go concurrency is so easy! And then you point out issues in a review, so the author feeds it back into an LLM,…
> a subtle data race and a rare deadlock That's a langage problem that humans face as well, which golang could stop having (see C++'s Thread Safety annotations).
I really liked this part: In December 2024, during the frenzied adoption of LLM coding assistants, we became aware that such tools tended—unsurprisingly—to produce Go code in a style similar to the mass of Go code used during training, even when there were newer, better ways to express the same idea. Less obviously, the same tools often refused to use the newer ways even when directed to do so in general terms such a…
battle of my life. several times i’ve had to update my agent instructions to prefer modern and usually better syntax to the old way of doing things. largely it’s worked well for me. i find that making the agents read release notes, and some official blog posts, helps them maintain a healthy and reasonably up-to-date instructions on writing go.
Not related with go: I recently tried to learn Python beyond the classical example code from the web. After discovering that there are more or less 4 different ways to do a thing with no clear guide what best practice is. I come from C and there one is happy if there is ONE way to do a thing :). Is Go at this stage? Im Intrested in learning Go but not to a point where i need a LLM to determin if my code follows best…
go is fairly opinionated and there is very often only one way to do a thing.
For parts where it is not the case see this thread they really work on keeping a fairly simple language. I'd recommend it to anyone tired of python messes
The use of LLMs will lead to homogeneous, middling code.
You might even say that LLMs are 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.
The use of LLMs will lead to homogeneous, middling code.
It does. I’ve been writing Go for long enough, and the code that LLMs output is pretty average. It’s what I would expect a mid level engineer to produce. I still write code manually for stuff I care about or where code structure matters. Maybe the best way is to do the scaffolding yourself and use LLMs to fill the blanks. That may lead to better structured code, but it doesn’t resolve the problem described above wher…
I am also of the opinion that LLMs are still pretty bad at what's called "Low level design" - that is structuring functions and classes in a project. I wonder if a rule like torvalds' "No more than 4 levels of indentation" might make them work better.
> a subtle data race and a rare deadlock That's a langage problem that humans face as well, which golang could stop having (see C++'s Thread Safety annotations).
No language protects from dead lock.
I probably agree that they don't protect you from all deadlocks, but some languages protect you from some dead locks.
I think tooling that can modify your source code to make it more modern is really cool stuff. OpenRewrite comes to mind for Java, but nothing comes to the top of my mind for other languages. And heck, I into recently learned about OpenRewrite and I've been writing Java for a long time. Even though I don't like Go, I acknowledge that tooling like this built right into the language is a huge deal for language popularit…
In PHP you can use Rector[1]
It's used a lot to migrate old codebases. The tool is using itself to downgrade[2] it so that it can run on older PHP versions to help upgrades.
The use of LLMs will lead to homogeneous, middling code.
Middling code should not exist. Boilerplate code should not exist. For some reason we're suddenly accepting code-gen as SOP instead of building a layer of abstraction on top of the too-onerous layer we're currently building at. Prior generations of software development would see a too-onerous layer and build tools to abstract to a higher level, this generation seems stuck in an idea that we just need tooling to gener…
Where are the amazing no-hassle, no-boilerplate tools from last generation? Or the generation before that? Give me a break: it's easy to post this but it's proven very hard to simply "pick the right abstraction for everyone".
This is one area where reinforcement learning can help. The way you should think of RL (both RLVR and RLHF) is the "elicitation hypothesis[1]." In pretraining, models learn their capabilities by consuming large amounts of web text. Those capabilities include producing both low and high quality outputs (as both low and high quality outputs are present in their pretraining corpora). In post training, RL doesn't teach t…
I believe you absolutely could... as the model owner. The question is whether Go project owners can convince all the model trainers to invest in RL to fix their models and the follow up question is whether the single maintainer of some critical but obscure open source project could also convince the model trainers to commit to RL when they realize the model is horribly mistrained. In Stackoverflow data is trivial to…
I know Claude will read through code from Go libraries it has imported to ensure it is doing things correctly, but I do have to wonder for other languages and those small libraries, if we'll start seeing things like AGENT_README.md a file that describes the project, then describes what functionality is where in the code, and if necessary drills on a source file by source file basis (unless it's too massive - context limits are still limits). In any regard, I could see that becoming more common. Especially if you link to said file from the README.md for the model to go to. ;)