Why I Love Go
cloud.google.com
cloud.google.com
The code really looked like the pseudocode algorithm (albeit a bit different because of the lack of sumtypes).
I also like the error handling although multiple return values often preclude us from chaining calls. It forces to deal with error values a bit too eagerly at times but one get used to it.
And the language, tooling, etc, keeps improving steadily without breaking old code. Very good engineering from the implementers.
- I dislike in general code generation. This isn’t a Go thing, this is a “any language but rust” thing: macros are just _so good_. I don’t have to keep a code generator daemon running in the background, and I don’t have to worry about running a code generation step in CI.
- I dislike implicit interface adherence: this makes it so hard for me to navigate code bases. For instance, If I take a Foo interface, I just have to guess at where all the Foo implementers are?
Those are just a couple of my qualms. In general, though, I do reach towards Go for projects that I know aren’t going to hit massive scale (scale as in “need 10 developers supporting it”), and it hits the sweet spot for me that’s between prototyping in python and enterprise in Java / Rust.
Multiple return values and constant nil checking and error handling is odd - there are far better patterns for handling this but Go chose something that looks easy but doesn't scale well. I have other issues but writing good Go code that is easy to read feels very difficult.
Very short function parameters seems to be idiomatic but very odd as well. I never understood the desire to condense meaning as much as possible versus a more legible approach.