| ▲ | mbreese 7 hours ago | |
Go is really amenable to being used to write code by LLMs. New code takes time to pick up, but the LLM is a quick study. In my opinion, it has little to do with the speed of the language. The large quantity of source code to train on is quite helpful, but I think it's something else. There are three things that I think make it well suited to LLM authorship - 1) static typing and a quick compiler - a variable can't change type after it's declared (unlike Python) makes Go more robust compared to dynamic languages. You (almost) always know what the type of a variable is. And the quick compiling with hard-stop errors means that the LLM gets a solid signal for each round. 2) It's quite opinionated, syntactically. There is generally one way that Go lang code is supposed to look. That means it's pretty easy to read as well as write. The lack of things like operator/method overloading make it an easy language to reason about. 3) the stdlib and limited dependencies. Dependency trees tend to be shallow, and because of the static linking (by default), you can generally be confident that what you wrote will run. | ||