fareez.info

Why Go Is the Ideal Language for the AI Coding Era

Go is a very simple language. The philosophy it’s built on top of, is what makes it so beautiful. When I started learning Go, I had already mastered many languages both Object Oriented and Functional, but still craved for more language features in every one of them. I always missed a feature or two from another language when I was working on a project with a language.

It’s at that time that I set out to learn Go with the help of The Go Programming Language by Alan Donovan and Brian Kernighan (Yes the same Kernighan of the most famous The C Programming Language along with Ritchie). Ken Thompson was one of the person behind Go which made me even more curious, because he has been influential even before the C Language. So I wanted to give Go a genuine try out of respect for these great names. It worked and did change me a lot, from then on I stopped chasing language features even in other languages. Stability and ability to do in less ambiguous way is a great feature.

I’m sure Go wasn’t built with these AI coding agents in mind. But still, I think it’s the most ideal language to code using AI Coding tools. Why? Let’s see.

Simplicity

Smarter developers might despise it for not allowing them to do things in magical way. It has far less features than any other modern language. Go is a language for the masses, not for some special mathematical elites. It’s made in a way that the code should be more readable than being easy to write. There is no magic involved, if you want something to happen, you should call a function, should have the logic in the code in a readable fashion, no other way. This is very favorable for LLMs as the syntax space of the language is far less, LLMs could generate with more accuracy

No Ambiguity

You cannot do the same stuff in a lot of different ways in Go. Since the programming model is simple and it doesn’t have many ways. Standard libraries are batteries included and backward compatible. So if you want a piece of logic, there is good chance, most Go developers write it in the same way. It’s a huge benefit for LLMs to learn

Standardized Formatter

All the Go code you see around the world in any repo will be exactly formatted in one way. Unlike any other language, which has tons of opinionated formatting configs, Go has zero config and only one single way of formatting code. This is really good for LLMs to learn and generate. It’s like Go has the cleanest dataset for training LLMs.

Less Tooling Overhead

Go has far less tooling overhead compared to other platforms. Out of the box testing, coverage and benchmark utils gives an upper-hand not just to the developers but to the AI agents as well. When we employ an AI agent in a Node.js project it has to understand all the tools used and all the different configs of the tools used to make good impact. But Go has easy win in that case. You take an AI code editor like Cursor and you use Go, that’s all you need to build your next big thing.

Go is one of the example of how simplicity stands the test of time (C is another great language which does the same). Even as times change, AI is taking over, simplicity is still relevant and Go is going to have it’s best time.

comments powered by Disqus