Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The appeal of Go is that it has just the bare minimum feature set to be useful for modern backend engineering

I know that many people love Go, and I respect that, but I was never able to grasp its appeal (despite my two-year stint as a professional Go programmer). To me, the philosophy of Go seems to prioritize simplicity in the language at the cost of making software written in it more complex. Writing in Go often felt like a constant exercise in haveing to reinvent even the simplest things.



I suspect you've only seen poorly written Go, which is actually quite pervasive. The most common sign of it is the overuse of interfaces. You basically shouldn't define your own interface unless you need to export functionality. Interfaces are not a tool for organizing your code. Go is meant to be written in a very linear and naïve way, and it turns out quite good when you just do that.


Maybe I'm missing something obvious but that seemed to be the only option for injecting stub implementations in integration tests.


I prefer the testing libraries that do monkey-patching and consider mock implementations of interfaces to be an antipattern in Go, especially if it's the only reason for putting an interface between the calling code and a type.


Interfaces are one way to inject stubs, and a good way, but not the only way. You can also use function values as callbacks.


In Go you can jump from your IDE into the http server implementation in 3 clicks, and you can read the code easily, it's vastly different from other modern languages that have layers of un-necessary abstraction.

I worked in Java / C# with tons of interfaces all over the place, getter / setter in every files.


That's just bad code, but it's not inherent in the language. You can write bad code in any language.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: