top | item 45407034

(no title)

solumos | 5 months ago

“Better fit” in what ways?

Having used LLMs on a large Go codebase, I’ve found that Go is especially difficult to work with due to how unopinionated it is about things that are trivial in other languages. I’d be really curious about what the positives are.

discuss

order

kristianp|5 months ago

I've used Claude Code with a small Go project. The lack of some opinions makes it important to have some things codified in claude.md, such as telling it to running `go tool cover` to ensure claude is checking the code has test cases and writing new ones.

Positives for go is the relative lack of change in the language and libraries over the years since go 1.0. Less likely to need to correct ai-written code to use a newer version of a library with a different api. But there's limits to that in more obscure libraries.

furyofantares|5 months ago

I am mostly building stuff from the ground up and trying not to end up with a bunch of slop. I don't have experience dropping into a large Go codebase with it.

I have a strict requirement at this point to have a static type system. I need the LLM/agent to be able to leverage a type system at compile time, but I also need to be able to leverage the type system myself for guiding it, reviewing it, refactoring its work.

Of course that leaves a lot of options. I make small games and Go was not on my list to try initially - I've tried Lua with type annotations, Rust, C++, C, and C#. I've not yet tried TypeScript for games but would like to try it.

My observation has been that the less complex and less verbose the type system, the better the LLM has felt. That's a gut feel based on using these languages, I could be wrong about the cause - but based on that observation I opted to try Go and have been quite happy.

I was quite happy with C# before that but have been happier with Go.

Oh I also need a code-first game framework (not game engine) and would like it to target PCs, mobile, and hopefully web and have been happy with ebitengine whereas for C# I was happy with Raylib-cs except it seems quite difficult to target mobile.

mvid|5 months ago

The lack of opinion might benefit an LLM. Go is boring and verbose, not much room for cleverness. The code generated by AI or a human will probably be similar