News for hackers. Stuff that matters.
Re:Go Is a Well-Designed Language by ludwik on Friday January 31, 2025 @01:07PM (#42889978)
> 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.

Re:Go Is a Well-Designed Language by Thaxll on Friday January 31, 2025 @03:46PM (#42891779)
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.

Re:Go Is a Well-Designed Language by LtWorf on Friday January 31, 2025 @09:06PM (#42894938)
That's just bad code, but it's not inherent in the language. You can write bad code in any language.
Re:Go Is a Well-Designed Language by roncesvalles on Friday January 31, 2025 @01:56PM (#42890483)
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.
Re:Go Is a Well-Designed Language by nijave on Friday January 31, 2025 @02:14PM (#42890712)
Maybe I'm missing something obvious but that seemed to be the only option for injecting stub implementations in integration tests.
Re:Go Is a Well-Designed Language by mikeschinkel on Saturday February 01, 2025 @12:56AM (#42896059)
Interfaces are one way to inject stubs, and a good way, but not the only way. You can also use function values as callbacks.
Re:Go Is a Well-Designed Language by roncesvalles on Saturday February 01, 2025 @04:44AM (#42897194)
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.