Live data from Hacker News

A case for Go as the best language for AI agents

getbruin.com

301–310 of 310 posts

Re: A case for Go as the best language for AI agents

#301
post #294

Earlier quoted context omitted.

10+ years of lambdas, but you can still tell from new code that the language used to not have lambdas. Plenty of code is older than that too. The annotations are static, yeah. That's one advantage. I would still rather not do that. A lot of people were happy not to need that anymore in like NodeJS.

I mean, there are bad developers in every language. And old code continuing to run 10 years later is a huge value of the platform.

Any company that's 10 years old will have code that's 10 years old in every language they use. And every language has some flaw that was "fixed recently" but that's not relevant in a mature codebase. Like "Python packaging is fixed now with uv" no it's not. And especially anything to do with threading vs cooperative multitasking will stick around.

Mostly old code will keep working, but there are exceptions like Python 2->3 breakage that deserves all the criticism it got.

Re: A case for Go as the best language for AI agents

#302
post #296

Earlier quoted context omitted.

Java takes flags for min/initial/max memory that, as a strict law of nature, are always wrong the first time you try. And it holds onto unused memory unless you pass another flag. Idk exactly why there's no reasonable default for that, but probably cause it's in a VM. No other language has this problem.

It does give back memory nowadays. And it's not really a VM in that sense of the word. It's a runtime, Go also has such a runtime it's just bundled.

The Java "compiled" code isn't a native binary like in Go, it really does run in a VM. I honestly don't know if that's why they handle memory differently though.

Re: A case for Go as the best language for AI agents

#304

Earlier quoted context omitted.

Sure, things like counting the ‘r’s in strawberry, for example (till they are retrained not to make that mistake).

They don't see the letters, so how could they possibly succeed at that? It's like asking a human how many infrared flowers they see.

I'm pointing out that they don't 'think' or 'reason' like humans, they're very impressive, but I don't think they've reached the bar for thinking yet, as simple logic puzzles or puzzles like this prove (until the LLM authors take note and add special workarounds for those particular use-cases).

I believe most LLMS no longer fail at this, because they've been given the tools to do so (for example use python under the hood to count letters), but it's an important observation because it shows us that they don't think like us.

Re: A case for Go as the best language for AI agents

#305
I'm a Java developer by day and have also delivered production codebases in Python and Scala. Before that I worked in ETL with Informatica. I've been building systems professionally for quite a while.

I’ve tried LLM-assisted development across Java, JavaScript, Python, Rust, C++ and Go. The difference in how well models hold the system in their “head” becomes obvious once the codebase grows beyond a few thousand lines.

With most ecosystems the entropy explodes. Python and TypeScript in particular have an enormous combinatorial space: frameworks, build systems, typing styles, dependency patterns, project layouts. Two codebases solving the same problem can look completely different. That variability leaks directly into the training distribution and the output starts to drift.

Go sits at the opposite end of that spectrum.

There’s basically:

one formatting style one standard build system one dependency mechanism one dominant project layout a very small set of concurrency primitives a language that has barely changed in a decade

That constraint is exactly what LLMs thrive on. The solution space is narrow, so the model converges instead of wandering. In my own experiments, once a codebase passes ~8k lines, most languages start to show cracks: incorrect imports, wrong framework idioms, subtle API hallucinations. With Go the agents stay coherent much longer. The tooling helps too — extremely fast builds, deterministic formatting, and batteries-included tooling mean the feedback loop is tight.

Java often gets suggested as an alternative because it’s statically typed and mature. But in practice the ecosystem is a maze: Maven vs Gradle, Spring everything, annotation magic, layers of frameworks, multiple architectural styles. The language may be stable, but the surrounding universe isn’t.

I’m also a big Rust fan. If you actually need Rust’s capabilities it’s fantastic. But it’s slower to compile and significantly more complex for LLMs to work with. Beyond small codebases the difference becomes obvious.

One final point: architecture matters as much as language. Strong modular boundaries, API-first feature access, and good code maps help enormously when working with LLMs.

Used carefully, these tools are a serious productivity multiplier. The interesting question now isn’t whether they work - it’s which languages and system designs allow them to work reliably.

Re: A case for Go as the best language for AI agents

#306
The thing I’ve noticed with LLM-assisted development is that the language ecosystem matters far more than people expect.

Once a codebase gets beyond a few thousand lines, models stop struggling with syntax and start struggling with entropy. If the ecosystem allows many ways to structure the same program, the model’s output begins to drift.

I’ve tried building non-trivial projects with LLM assistance in Java, JavaScript, Python, Rust, C++ and Go. The difference in how well the models hold the system in their "head" becomes obvious once you pass a few thousand lines of code.

Python and TypeScript in particular have a massive combinatorial space: frameworks, build systems, typing styles, dependency patterns, project layouts. Two teams solving the same problem can produce codebases that look completely different. That variability leaks into the training distribution and the model has to guess which universe it’s operating in.

Go sits at the opposite end of that spectrum.

There is essentially:

- one formatting style

- one standard build system

- one dependency mechanism

- one dominant project layout

- a very small set of concurrency primitives

- a language that has barely changed in a decade

That constraint turns out to be exactly what LLMs thrive on. The solution space is narrow, so the model converges instead of wandering.

In my experiments, once a project passes ~8k lines most languages start to show cracks: incorrect imports, wrong framework idioms, subtle API hallucinations. With Go the agents stay coherent much longer. Extremely fast build times and batteries-included tooling also tighten the feedback loop significantly.

Java often gets suggested as an alternative because it’s statically typed and mature. But in practice the ecosystem is a maze: Maven vs Gradle, Spring everything, annotation magic, layers of frameworks, multiple architectural styles. The language may be stable, but the surrounding universe isn’t.

I’m also a big Rust fan. If you genuinely need Rust’s capabilities it’s an excellent tool. But it’s slower to compile and significantly more complex for LLMs to work with. Beyond small codebases the difference becomes noticeable.

One thing that helps regardless of language is architecture. Strong modular boundaries, API-only feature access, and good code maps make a huge difference when working with LLMs.

Used carefully, these tools are a huge productivity multiplier. The interesting question now isn’t whether LLM coding works - it’s which languages, practices, and system designs allow it to work reliably at scale.

Re: A case for Go as the best language for AI agents

#307
post #277

Earlier quoted context omitted.

It’s even simpler to have a “register” method that takes the path specification, the HTTP verb, and a function to handle the request. There is no case where annotations are superior to the meta programming facilities built into the language proper. Annotations only became popular because Java didn’t have easy syntax for function references or anonymous functions for a very long time.

Lambdas have been available for 10+ years. Also, hard disagree on "register" method being simpler. A register method is code, while an annotation is a static declaration, ergo data. The former can happen in a helper function, renaming it from "register" to "path", changing/modifying the parameters, or putting it into some while loop dynamically generating endpoints. At the very extreme it is Turing complete to figure…

Time again to learn the lesson of Lisp:

Code is data.

Data is code.

Re: A case for Go as the best language for AI agents

#308
post #294

Earlier quoted context omitted.

10+ years of lambdas, but you can still tell from new code that the language used to not have lambdas. Plenty of code is older than that too. The annotations are static, yeah. That's one advantage. I would still rather not do that. A lot of people were happy not to need that anymore in like NodeJS.

I mean, there are bad developers in every language. And old code continuing to run 10 years later is a huge value of the platform.

Yes and with Java they’re the ones still prioritizing annotations over the options built into the core language.

Re: A case for Go as the best language for AI agents

#309
Concrete experience from building a Go framework with AI as the primary developer (not just a helper): the properties that make Go good for agents are exactly what you'd expect — one formatter, one build system, static typing, and a strong convention around package structure.

The part that surprised me: the bottleneck wasn't AI capability. It was that the tooling wasn't designed for AI as the builder. Once I locked architectural decisions upfront and enforced a single way to do everything, the AI stopped hallucinating boilerplate and started making genuinely good decisions.

Zero ambiguity in the codebase = zero drift in AI-generated code.

Post reply on HN