Is Go the Best Language for AI Agents?
getbruin.com Post + Hacker News Reactions โ A Rubyist's Perspective
getbruin.com posted "Go Is the Best Language for AI Agents" and it got 300+ comments on HN. Here are the core arguments and counterarguments from a Rubyist's perspective.
The Original Post's Core Argument
AI agents generate code at scale. Most of it merely "looks plausible," so verification is the key challenge.
Go is well-suited for this verification:
Compiled language advantage โ Static typing catches wrong types/arguments at compile time. If compilation passes, you're guaranteed syntactically correct code. No more "discovering TypeError in production" like Ruby.
Go over Rust โ Go's simpler syntax means LLMs generate more idiomatic code. Go compiles faster, shortening the agent's feedback loop. More Go code in training data.
Standardized tooling โ gofmt, go test, go build are standard. No JS-style "this project uses Prettier, that one uses ESLint" chaos. Tell an agent to format code and it runs gofmt.
Cross-platform binaries โ GOOS=linux go build and done. No Ruby-style "this gem doesn't work on Windows."
Parts That Sting for Rubyists
Ruby's weaknesses are precisely targeted.
The problem with Python and Ruby: 20 different ways to do the same thing. Net::HTTP vs Faraday vs HTTParty vs RestClient. Agents can't predict which library to use. Go has net/http for most cases.
Agents generate valid Go code on the first try about 95% of the time (author's experience). Ruby/Python errors are only found at runtime. This gap matters in agent workflows.
HN Counterarguments
"Java works for the same reasons" โ True. More training data, stronger type system. The post not mentioning Java is slightly biased.
"Rust is better" โ Once you pass the compiler, runtime errors are near-zero. But Rust changes fast, making it hard for LLMs to keep up with the latest APIs. Good point that Rust tests live in the same file, so agents update tests when modifying source.
"OCaml/Haskell are best" โ Powerful type systems (including GADTs), pure functions, fast builds. Theoretically correct but training data is scarce.
"Python was better" โ Someone who rewrote projects in multiple languages found Python worked best with Claude. Shorter code, easier to understand.
"Domain matters more than language" โ The most pragmatic take. TypeScript for web, Python for data/ML, Go for CLI/infra. The "best language" depends on what the agent does.
What Should Rubyists Do
Ruby's disadvantages for agent code generation are real. Dynamic typing, framework fragmentation, runtime error dependence. These are structural weaknesses.
But rewrite your Rails app in Go? No. As the original post admits, "in 12 months we might rarely read code directly." Current language trade-offs may diminish as LLMs improve.
Pragmatic approach: Ruby for business logic, Go for performance-critical parts. Convert Sidekiq workers to Go, build CLI tools in Go. Many teams already do this.
The real lesson isn't "Go is best" but that compile-time verification + standardized tooling + simple syntax gain value in the agent era. Whether Ruby can evolve in this direction is the more important question for Rubyists.
Original Claims vs HN Counterarguments
| Claim | HN Counter | Rubyist Take |
|---|---|---|
| Go compilation verifies agent code | Java, Rust, OCaml do the same | Ruby depends on runtime โ real weakness |
| Go simpler than Rust | Rust: compilation pass = runtime safe | Ruby is simple too but no type safety |
| Standard tools (gofmt, go test) | TS standardized enough with tsc+vitest | Ruby needs RuboCop+RSpec+Bundler combo |
| 95% valid code generation rate | Python worked better with Claude for some | No Ruby numbers โ likely lower |
Key Takeaway for Rubyists
Acknowledge: Static typing + fast compilation + standard tools gain value in the agent era. Ruby is weak in all three. Don't overreact: \"Best language\" depends on domain. No need to rewrite Rails in Go. Be pragmatic: Ruby for business logic, Go for performance-critical parts.
Ruby to Go
Agent-generated code verified instantly by compiler โ Ruby doesn't know errors until runtime
gofmt/go test/go build standard tools โ contrast with Ruby's RuboCop/RSpec/Bundler fragmentation
Go's single net/http vs Ruby's Net::HTTP/Faraday/HTTParty/RestClient fragmentation
Cross-platform binaries built-in โ no Ruby gem OS compatibility issues
Pragmatic approach: Ruby (business logic) + Go (performance-critical) combination
Pros
- ✓ 95% of agent-generated code valid on first try via compile-time verification (Ruby depends on runtime)
- ✓ gofmt unifies formatting โ agents don't need to debate Prettier vs ESLint
- ✓ No breaking versions for 10+ years โ LLM training data stays valid even when old
- ✓ Cross-platform binaries let agents verify and run identical code across OS environments
Cons
- ✗ Library ecosystem weaker than Ruby/Python โ especially data/ML
- ✗ HN counterpoint: Rust has near-zero runtime errors after compilation โ safer than Go
- ✗ HN counterpoint: practical experience shows Python worked best with Claude
- ✗ \"Best language\" depends on domain โ web is TS, data is Python, only CLI/infra is Go