Live data from Hacker News

A case for Go as the best language for AI agents

getbruin.com

101–110 of 310 posts

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

#101
post #56
post #38

Earlier quoted context omitted.

Rust is the best language for AI: - Rust code generates absolutely perfectly in Claude Code. - Rust code will run without GC. You get that for free. - Rust code has a low defect rate per LOC, at least measured by humans. Google gave a talk on this. The sum types + match and destructure make error handling ergonomic and more or less required by idiomatic code, which the LLM will generate. I'd certainly pick Rust or Go…

The downside is that even simple Rust projects typically use hundreds of dependencies, and this is even worse with LLMs, who don’t understand the concept of “less is more”.

Nobody forces dependencies on you. You can control that.

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

#102
post #55

Earlier quoted context omitted.

Exactly. Here's my experience using LLMs to produce code: - Rust: nearly universally compiles and runs without fault. - Python,JS: very often will run for some time and then crash The reason I think is type safety and the richness of the compiler errors and warnings. Rust is absolutely king here.

[flagged]

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.

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

#103
post #31

If code is now free, why does the language matter at all?

All code has bugs, the vector space of all possible bugs determines the entropy of the problem space for a large language model to traverse.

Reduce entropy, increase probability of the correct outcome.

LLMs are surfing higher dimensional vector spaces, reduce the vector space, get better results.

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

#104

I have let Gemini, Claude Code and Codex hallucinate the language they wanted to for a few days. I prompted for "design the language you'd like to program in" and kept prompting "go ahead". Just rescued it from a couple too deep rabbit holes or asked it for some particular examples to stress it a bit. It´s a weird-ass Forth-like but with a strong type system, contracts, native testing, fuzz testing, and a constraint…

Wow that is wild, that is exactly along the lines of my fantasy language. It'd be so easy to go into the deep end building tooling and improving a language like this.

I have had to check myself a bit, too easy to fall too deep into what is essentially a practical joke

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

#108

I wonder how many tokens are spent generating: if err != nil {return err} for large programs and over a long period of time. May be this is good incentive to improve error handling in Go.

That happens often enough that it might have its own token, if you BPE-encoded specifically for golang.

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

#109
post #98

Earlier quoted context omitted.

Because you'll have to review it, and Go's design limits the number of ways it can go wrong. Code is free, sure, but it's not guaranteed to be correct, and review time is not free.

If code must be correct, and review time is not free, and review time is costlier than code time, why not just ... ... write the code yourself?

I 100% agree, and do, but it's an answer to the GP's question (why generated code language matters)

I think many many people just skip the "review" step in this process, and assume they're saving time. It's not going to end well.

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

#110
post #55

Earlier quoted context omitted.

[flagged]

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?
Post reply on HN