I honestly don’t get why people like Go. Structural typing makes it so difficult to find classes that interpret an interface. Every dumb go project has to be opened in an IDE or something with a language server to find implementors of an interface. Also, forcing every capitalised object in a module or struct to be exported is just… wat? Returning a tuple of whatever, err also feels wrong. It’s like they couldn’t decide between throwing exceptions or an enum and went with something in between.
I get that the inbuilt concurrency features are nice, but the rest of the language and stdlib feel very lackluster. At least that’s my impression after ~2 weeks of it. My retreat to Rust was rather quick.
The stdlib I actually find quite complete. Especially for http projects. You really don’t need third party libs for that for example.
The errors were super strange to me at the start, but I’ve come to really like it over exceptions. It is similar to old error codes, but I feel that this makes one always have to be mindful of error handling and the non happy path (thinking of large Python projects where no one cares about exceptions).
A lot of people tend to compare Go and Rust, but I feel that the languages are just too different. Rust is good for a variety of things which don’t overlap with the things Go is good for.
What I don’t like about Go’s error handling is that it’s built on returning a tuple of result/error instead of enum/union/variant/whatever-its-called. Which means that on error path you have to return something for successful result too (usually a “zero-initialized” struct because Go doesn’t have optionals). You are not returning result or error, you are always returning both. This is just wrong.
I honestly don’t get why people like Go. Structural typing makes it so difficult to find classes that interpret an interface. Every dumb go project has to be opened in an IDE or something with a language server to find implementors of an interface. Also, forcing every capitalised object in a module or struct to be exported is just… wat? Returning a tuple of
whatever, err
also feels wrong. It’s like they couldn’t decide between throwing exceptions or an enum and went with something in between.I get that the inbuilt concurrency features are nice, but the rest of the language and stdlib feel very lackluster. At least that’s my impression after ~2 weeks of it. My retreat to Rust was rather quick.
Anti Commercial-AI license
The stdlib I actually find quite complete. Especially for http projects. You really don’t need third party libs for that for example.
The errors were super strange to me at the start, but I’ve come to really like it over exceptions. It is similar to old error codes, but I feel that this makes one always have to be mindful of error handling and the non happy path (thinking of large Python projects where no one cares about exceptions).
A lot of people tend to compare Go and Rust, but I feel that the languages are just too different. Rust is good for a variety of things which don’t overlap with the things Go is good for.
What I don’t like about Go’s error handling is that it’s built on returning a tuple of result/error instead of enum/union/variant/whatever-its-called. Which means that on error path you have to return something for successful result too (usually a “zero-initialized” struct because Go doesn’t have optionals). You are not returning result or error, you are always returning both. This is just wrong.
Technically you need a separate linter (
errcheck
) to ensure you don’t just ignore errors. This is…not great. (That should have been a compiler error.)Yes, true. Having it built in in the compilation would be nice. Or at least having errcheck as a tool which already comes packed with Go.
Go has changed over time to include more things like this. Maybe one day this will be addressed.
Yeah, I was particularly glad to see the change in loop variable semantics become a stable part of the language. That was a terrible footgun.
There are other things I dislike about Go, but I do think it’s improving while maintaining its better qualities, which is no small feat.