Live data from Hacker News

Go is an ideal language for AI-assisted software engineering

developers.googleblog.com

111–120 of 586 posts

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

#111

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…

I mean I don't have anything against go, but frankly - it's not really better then modern Java.

Each have their trade-offs, both can support native compiled application code. Some architectures are easier to review and code in golang, but others go much better with Javas richer ecosystem and better composability.

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

#112
post #39
post #34

Earlier quoted context omitted.

I have a question: why do you think Go is better compared to other languages? After all, learning a new language takes a lot of time. While basic syntax is common and quick to pick up, mastering a language's specific mental model requires a significant time investment, which is why I've used Go before but never seriously. My interest was piqued recently when I heard about TypeScript tooling being ported to Go, and I…

> why do you think Go is better compared to other languages? I didn't say that. :) > where do the results claiming that AI agents generate superior Go code actually come from? Like I said - reports from users. > Is it a fair, apples-to-apples comparison? No - these are reports from users, not a systematic analysis.

>> why do you think Go is better compared to other languages?

> I didn't say that. :)

I call this the Go paradox.

I simultaneously believe we should reach for it 80% of the time to solve common collaborative problems. And being a poorer language is actually an asset in these cases.

However, in doing so, we get rusty lose our fluency in more expressive, perhaps even better languages.

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

#113

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, it only seems to get in their way, and they spend more time fighting Rust's infrastructure than writing code.

I have found exactly the opposite to be true: as always, people think they can write safe concurrent code without the machine checking them and end up getting it completely wrong in lots of subtle cases. Except the problem is now much worse because you're not even writing the code, or in many cases, reading it. I prefer a language with a type system that saves me from the review burden of closely checking (and pretty much always finding issues in) concurrency invariants. And even tells me a bit more beyond that about what the code is intended to do.

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

#116
post #39
post #34

Earlier quoted context omitted.

I have a question: why do you think Go is better compared to other languages? After all, learning a new language takes a lot of time. While basic syntax is common and quick to pick up, mastering a language's specific mental model requires a significant time investment, which is why I've used Go before but never seriously. My interest was piqued recently when I heard about TypeScript tooling being ported to Go, and I…

> why do you think Go is better compared to other languages? I didn't say that. :) > where do the results claiming that AI agents generate superior Go code actually come from? Like I said - reports from users. > Is it a fair, apples-to-apples comparison? No - these are reports from users, not a systematic analysis.

> Like I said - reports from users.

How does that work? Are they generating the same project in different languages and comparing the results? What does it mean for the code to be "better"?

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

#117
post #27

Definitely agree with this article. At Netflix, I lead the Go language guild. We've been seen increasing reports of users finding their AI agents writing better Go code than other languages, and increasing reports of projects favouring Go over other languages. Two additional notes I'll add: - Go has _great_ resources on writing good Go code, including treasure troves at https://go.dev/doc/effective_go and https://goo…

When you give those resources to your coding agent, do you give them URLs? Or work with local versions?

I've found a lot of success pointing claude at locally downloaded docs over llms.txt URLs but not sure how to scale the pattern for a bigger project.

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

#118
post #27

Definitely agree with this article. At Netflix, I lead the Go language guild. We've been seen increasing reports of users finding their AI agents writing better Go code than other languages, and increasing reports of projects favouring Go over other languages. Two additional notes I'll add: - Go has _great_ resources on writing good Go code, including treasure troves at https://go.dev/doc/effective_go and https://goo…

I work at a large devsec company which uses primarily Go and TypeScript

I've found that the LLM generated Go has few mistakes, and generally isn't too obscure. But the volume of code is so high, colleagues do a bad job of reviewing it.

I've seen a lot of very silly decisions made, like returning the wrong HTTP code, or miscategorizing a metric used for an SLO, that I just don't think is helped by the sheer volume of code one has to wade through.

Ironically, we are considering migrating some initiatives to Rust, exactly because experiments indicate it works well with LLM development.

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

#119

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…

Simple toolchain which supports trivial lightweight deployment is my go to attribute to select Go in projects.

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

#120
post #93

Earlier quoted context omitted.

Read the article to find out. Token use didn't seem to be a criteria from my casual reading, but maybe you can illuminate me what section pointed to that, I may have been too superficial in my reading

Do not assume I haven't read.

> Do not assume I haven't read.

It's hard not to, given your comments in this thread.

Post reply on HN