Live data from Hacker News

Go is an ideal language for AI-assisted software engineering

developers.googleblog.com

271–280 of 586 posts

Re: Go is an ideal language for AI-assisted software engineering

#271
post #204

This would have been more credible coming from someone other than the creator of the Go language. I'm personally leaning into rust for LLM. The whole fussy compiler & errors surface at compile time seems IDEAL for LLMs for me. Hammering compile with tokens is a way better strategy than trying to deduce where stuff may fail at run time and try to catch it via tests. Tokens are cheap, surprises at runtime are not. So a…

fwiw I have a bunch of LLMs writing first Lean code and now Agda code. My observation. LLMs find reasoning about Agda as difficult as I find reasoning about C code. I've thrown a lot of gnarly C and Ruby code at all sorts of LLMs and they have only gotten more and more impressive as frontier models have gotten stronger. With Agda, they're like "hmm, tricky" whereas for me it's an impenetrable fortress. I've asked the…

>fwiw I have a bunch of LLMs writing first Lean code

How do you bridge the mental gap?

The gap between me writing high quality rust do this steps and something being logically sound seems enormous to me

Maybe I'm misunderstanding things but I just can't articulate my ideas in casual lean4. But i can do casual rust spec

Re: Go is an ideal language for AI-assisted software engineering

#272

I wouldn't say Go is IDEAL for AI coding, but it certainly has the case for one of the best programming languages that currently AI uses. Go definitely has its share of problems for human authors because it's so verbose and boilerplate heavy, which means it's less of an issue with LLMs than it is for human coders. Rust is comparatively worse, because LLMs don't make the same coding mistakes that humans do that justif…

> Rust is comparatively worse, because LLMs don't make the same coding mistakes that humans do that justifies the existence of the borrow checker, [...] That's a pile of bollocks, pardon my French. Source/proof? And to the contrary: I've been working on a TS codebase that calls into C++ native/wasm-compiled code for six months now. The code is mostly LLM written. Over these last six months we had four use-after-free…

I'm curious on what you mean by "TS use-after-free", because as you obviously know, TS is GC'd. I don't have access to your codebase of course, but it seems to me that it is an FFI/native code boundary lifetime bug in the binding between TS and C++/WASM, not part of the TS managed memory. Comparing TS to native C++ FFI and/or manually managed WASM resources interface vs Rust + Rust ownership checked resources interface is kinda comparing apples to oranges here.

And as other commenters here have said, Rust's main issue for LLMs is infectious lifetime propagation, where the borrow checker knows you violated a lifetime constraint but doesn't tell you how to actually solve it, so LLMs get error messages like:

  borrowed value does not live long enough
  cannot borrow `x` as mutable because it is also borrowed as immutable
  lifetime may not live long enough
And instead of trying to reason through the ownership graph, they just take the shortest path to get these things to go away by bypassing the borrow checker entirely, which defeats the entire point of using Rust to begin with.

Re: Go is an ideal language for AI-assisted software engineering

#273

Earlier quoted context omitted.

I mean this isn't true, formatting is the most trivial part. And so many languages have an opinionated formatter these days (e.g. Black)

>> ...there is no debate... > ...And so many languages have an opinionated formatter these days The crux of gp's post is for Go, there is no debate as 'go fmt' is the only one that matters. Black is great, but some people prefer Ruff, leading to ...debates about which formatter the team/org should use. Go's batteries-included philosophy makes those discussions moot on so many levels beyond formatting.

As if projects haven't used to have a coding style. What's so hard in saying that code should be formatted with Black, yapf, ruff etc, beats me.

Re: Go is an ideal language for AI-assisted software engineering

#274
I haven't touched Go in over a decade (since before generics!) but I can see why this would be true. My theory is that LLMs absolutely love very tight, focused context. Go inherently restricts how many abstractions you can stuff into your code, and more abstractions tend to make the context a lot more complex and noisy. So LLMs love Go code because it keeps things simple.

The thing about Go, which some have complained bitterly about and others (and TFA) have touted as a strength, is the limited expressiveness of the language (hence my remark about generics!) This is what restricts the number of abstractions in Go code, leading to more verbose but much simpler code all around. Choosing between simplicity and expressiveness is a matter of taste, but also organizational dynamics; for larger organizations which require a large amount of context shared amongst a large pool of employees, it's better for the code to be simpler and locally understandable. As TFA indicates, this has been a guiding principle for Go.

I think what is happening with AI coding is similarly related to context. Consider that while more expressive languages enable more abstractions, they can make the code more concise, but critically, this also spread the logic around. E.g. in large Java codebases you will find deep inheritance hierarchies with class and method definitions spread around a dozen different source files and JavaDoc references.

This necessitates finding and stuffing a lot more information into the context for any given task, a lot of it irrelevant and all of it more complex, because it requires making multiple hops of reasoning to figure out the logic. On the other hand with fewer abstractions, all the necessary code and logic though verbose is right there. It's much easier for a human and an agent to follow that code.

The difference is a human gets tired reading a lot of code, which is what pushes us to devise more abstractions, whereas an AI does not get tired.

I get the sense that if a context is stuffed full of highly relevant information, the agent will perform well regardless of the size of the context window. But the moment you pollute it with noisy irrelevant information, performance will drop regardless of the size of the window. (There are some papers showing this effect IIRC.) Hence simpler code, as encouraged by simpler languages like Go, are more amenable to tighter and simpler contexts, which work better for AI.

Re: Go is an ideal language for AI-assisted software engineering

#275
post #141

Earlier quoted context omitted.

I think you're projecting. You wrote > Go still has not yielded a correct implementation of Raft or Paxos while there are dozens in Java, C++, and Rust. That says that there are correct (i.e., bug-free) implementations in those languages. The GP noted > "we’ve found bugs in every Raft implementation we’ve tested, ..." which says that there aren't any correct ones. You then wrote > I didn't say other languages don't h…

The intersection of the set of Raft libraries Antithesis tested and all Raft libraries in existence do not fully overlap. I personally have worked on multiple proprietary ones that Antithesis would not have access to.

I work at Antithesis, we're happy to test out any Raft implementation that has so far escaped our notice :)

Re: Go is an ideal language for AI-assisted software engineering

#276
post #208

Earlier quoted context omitted.

etcd has had numerous liveness and safety bugs, with one happening as recently as December of 2025. Would you consider that a correct implementation? You may be interested in knowing that the largest managed Kubernetes service in the world (AWS EKS) ripped out etcd for in favor of their homegrown consensus service for large scale EKS clusters: https://aws.amazon.com/blogs/containers/under-the-hood-amazo...

etcd is some of the most amateur code I've ever seen, despite being one of the oldest and presumably most mature "infrastructure" projects written in Go. goBGP is arguably even worse. I don't have a third place in mind that's even worth mentioning relative to these two.

just curious, what problems do you see with gobgp?

(I have only a rather basic familiarity with go, but was considering gobgp for an infra project...)

Re: Go is an ideal language for AI-assisted software engineering

#277
post #180

Earlier quoted context omitted.

I've had a really terrible time getting LLM to properly handle errors as return values. It seems that bubbling up errors, in a side channel, to a contextually relevant point in the code (exceptions) seems MUCH easier for LLM to reason about/implement properly. Maybe my problem is I'm using a language with exceptions, so trying to go against the statistical grain, with return values, is just too much.

Exceptions are inherently better for high-level code, where basically every loc can fail and 99% of the time you only want to bubble that up. You only want errors as values in systems code, where exceptions would be landmines. Rust and Go both did that because they were at least originally designed for systems code. Also, Go makes it way too easy to accidentally swallow an error. Rust doesn't have that problem.

[deleted]

Re: Go is an ideal language for AI-assisted software engineering

#278

I'd argue Go is not on a "Pareto frontier" and that no matter how you value the various attributes of programming languages, a fair assessment will never select Go. A simple example is: if you highly value language popularity; Go is not most popular. If you highly value a type system that catches errors; Go's type system catches fewer errors than others. Etc. There is no weighted sum of attributes that will select Go…

Uh compile time and linting efficiency, lightweight runtime, gc.

There’s no equivalent competitor, it’s the best if u want to just write lots of undifferentiated code.

Re: Go is an ideal language for AI-assisted software engineering

#279
post #30

Who cares? Languages are tools, LLMs are tools. Use the ones more appropriate for what you are trying to do. Is Go better than CSS if you are doing web layouts? Is it better than zig if you are outputting minimal wasm deliverables? Is it better than swift if you are doing iOS specific development? Is it better than bash for OS scripting? Think about what you are doing and choose appropriately. This was true before LL…

> Is it better than zig if you are outputting minimal wasm deliverables? Which tradeoffs are you willing to accept? Zig (along with several other languages) is superior in a lot of ways for that type of job, but I still settled on Go for a particular minimal WASM (browser) project. It wasn't my first choice, but it was where I ended up because LLMs kept going out to lunch in other languages and I didn't have anywhere…

Curious what kind of application you used wasm and Tinygo for? Obviously not the kind of app that an LLM would usually spit out a bunch of react for.

Re: Go is an ideal language for AI-assisted software engineering

#280

I'd argue Go is not on a "Pareto frontier" and that no matter how you value the various attributes of programming languages, a fair assessment will never select Go. A simple example is: if you highly value language popularity; Go is not most popular. If you highly value a type system that catches errors; Go's type system catches fewer errors than others. Etc. There is no weighted sum of attributes that will select Go…

Uh compile time and linting efficiency, lightweight runtime, gc.

There’s no equivalent competitor, it’s the best if u want to just write lots of undifferentiated code.

To caveat this if u want to run about 50 agents or so in parallel, all the typescript projects burn ur disk via node modules. The rust ones take forever to compile and burn too much compute

Post reply on HN