I Love Go; I Hate Go
Oh. Go love-hate relationship post. My turn. So I really like channels and coroutines built into language and used everywhere: it makes some patterns compose nicely and language very productive.<p>But just as in the article - some of Golang choices are opinionated and IMO just stupid. Lack of assertions is one: Sure programmers are prone to ignoring errors, but Go is not helping at all. Just bans assertions and provides no improvements. No `try!`&amp;`Result` like Rust, not even warning by default if you ignored returned error (IIRC, go lint or go vet checks it) . So what&#x27;s the point?<p>How do you decrement an atomic in Go?<p>AddUint32(&amp;x, ^uint32(c-1))<p>That&#x27;s how. Easy to read, and self-explaining. <a href="https:&#x2F;&#x2F;golang.org&#x2F;pkg&#x2F;sync&#x2F;atomic&#x2F;" rel="nofollow">https:&#x2F;&#x2F;golang.org&#x2F;pkg&#x2F;sync&#x2F;atomic&#x2F;</a> . I mean... come on.<p>Unused errors being an error is super annoying, and changing variable capitalization everywhere, because you want to change symbol visibility is another daily frustration source.<p>Oh, and all my contacts with the community were very unpleasant (maybe it&#x27;s just me, or bad luck). Any questions ended with some form of &quot;you must do it one true way, otherwise you&#x27;re stupid&quot;. Eg. once I was looking for a way to terminate unit test in case of error, instead of writing `if err != nil { t.Errorf(...) }` over and over again after every line, as in test, every error is just terminating condition. In Rust I would just `.unwrap()` or `.expect()`, which would fail the test, report backtrace, etc if anything unexpected went wrong. All the help that I got was just snarky comments for being lazy.<p>I will continue to use Go in some projects, as it gets the job done, performance is OK, has some userbase, and ecosystem is quite vital, but overall, it seems to me that it&#x27;s rooted in same form of stubborn crudeness that has no good reason in XXI century, ignoring years of research and good ideas. For anything more demanding, or fun I would always go with Rust.