Live data from Hacker News

A case for Go as the best language for AI agents

getbruin.com

231–240 of 310 posts

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

#231
post #134
post #118

Earlier quoted context omitted.

Most of these reasons apply to Java as much, if not more. It's an even more popular language with even more training data and also has a better type system so more validation on LLM output, etc.

Java has decade(s) of cruft and breaking changes which LLMs were trained on. It's hard to compare. Plus Go compilation speed/test running provides quick iteration for LLMs.

All you need is a JAVA_CODING_GUIDELINES.md with some hints about what kind of Java code you like the agent to write.

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

#232
post #118
post #100

I've been saying this for maybe nine months vis-à-vis my consulting work keeps proving it. Go is an excellent language for LLM code generation. There exists a large stable training corpus, one way to write it, one build system, one formatter, static typing, CSP concurrency that doesn't have C++ footguns. The language hasn't had a breaking version in over a decade. There's minimal framework churn. When I advise teams…

Most of these reasons apply to Java as much, if not more. It's an even more popular language with even more training data and also has a better type system so more validation on LLM output, etc.

Think of the typical quality of Java that LLMs encounter vs the typical quality of Go.

You've almost certainly got more experts-exchange.com than github.com

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

#233
post #118
post #100

I've been saying this for maybe nine months vis-à-vis my consulting work keeps proving it. Go is an excellent language for LLM code generation. There exists a large stable training corpus, one way to write it, one build system, one formatter, static typing, CSP concurrency that doesn't have C++ footguns. The language hasn't had a breaking version in over a decade. There's minimal framework churn. When I advise teams…

Most of these reasons apply to Java as much, if not more. It's an even more popular language with even more training data and also has a better type system so more validation on LLM output, etc.

The points about tooling certainly do not apply to Java, for example, Maven vs Gradle (which is a huge mess in and of itself - do you use Kotlin or Groovy), and which plugins are you willing to pull in? Or is Ant still the thing? SpotBugs, Spotless? What test framework do you use? Do you use Mockito or one of the myriad alternatives?

Go has _none_ of this nonsense, and it's better for it. Nor does Rust, FWIW, which IMO is also a better target language than Java for just about everything.

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

#234

Earlier quoted context omitted.

If you use the stable version of Rust, it's stable. There's a very strong commitment from the Rust folks on that specific point.

The only thing I see is the LLM not being aware of new features, so I have to specify the version rust.

Having a .rust-toolchain file and the edition in Cargo.toml should achieve this - and both of these should be done anyway!

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

#235
post #115
post #100

I've been saying this for maybe nine months vis-à-vis my consulting work keeps proving it. Go is an excellent language for LLM code generation. There exists a large stable training corpus, one way to write it, one build system, one formatter, static typing, CSP concurrency that doesn't have C++ footguns. The language hasn't had a breaking version in over a decade. There's minimal framework churn. When I advise teams…

> But LLMs don't care about expressiveness, they care about predictability. I think this is true, but it misses a very key point. Go does an impressively bad job at designing APIs that are difficult to misuse, so LLMs will misuse them and will require also writing unit tests to walk through it, just to validate it used the libraries correctly. This isn't always possible (or is awkward/cumbersome) for certain scenario…

Rust happens to be my favorite language, but I will say that the Rust has a massive churn on libraries and frameworks

Rust got a severe case of npm-itis

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

#236
post #185
post #125

Earlier quoted context omitted.

Except that Go is a simpler, smaller language than Java. That's one of the key points in the post.

More simplistic, not really simpler.

I guess you misunderstood he meant simpler as in "easier"? Because I thought Something simplistic is simple...? Not an English native tho.

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

#238
post #110

Earlier quoted context omitted.

This is quite sad to see someone react to a comment they disagree with by assuming that different opinion is paid for. I'd love it if you dug into my comment history and found even a shred of evidence that I'm being paid to talk positively about my programming language of choice. I hope there aren't many of your type on here.

All comments are paid for in some way, even if only in "warm fuzzies". If that is sad, why are you choosing to be sad? But outlandish comments usually require greater payment to justify someone putting in the effort. If you're not being paid well, what's the motivation to post things you know don't make any sense to try and sell a brand?

> If you're not being paid well, what's the motivation to post things you know don't make any sense to try and sell a brand?

Because it works. Because it does in fact make sense despite your frustration with the concept.

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

#239

I've read these arguments and they make perfect sense; but having tried different projects rewritten in Go vs Python (with Claude & Cursor); Python was just significantly faster, smaller, and easier to understand for Claude. It was done faster, and made less mistakes. I don't mean faster as execution time, but the code for its Python projects was almost a magnitude smaller. So it was done by the time its Go counterpa…

But did the agent handle python errors correctly, or did you get a bunch of Expect and pass statements?

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

#240
post #118

Earlier quoted context omitted.

Most of these reasons apply to Java as much, if not more. It's an even more popular language with even more training data and also has a better type system so more validation on LLM output, etc.

Exactly, the propping up of Go seems unfounded. Java in it's newest iterations make it more compelling as a target, and people, especially young people, overlook it because of its stigma as enterprise cruft.

im a java guy, but it simply takes too long to start up and uses too much memory to be a reasonable language for ai agent development.
Post reply on HN