Comment by egl2020

1 day ago

I've been writing go professionally for about ten years, and with go I regularly find myself saying "this is pretty boring", followed by "but that's a good thing" because I'm pretty sure that I won't do anything in a go program that would cause the other team members much trouble if I were to get run over by a bus or die of boredom.

In contrast writing C++ feels like solving an endless series of puzzles, and there is a constant temptation to do Something Really Clever.

> I'm pretty sure that I won't do anything in a go program that would cause the other team members much trouble

Alas there are plenty of people who do[0] - for some reason Go takes architecture astronaut brain and wacks it up to 11 and god help you if you have one or more of those on your team.

[0] flashbacks to the interface calling an interface calling an interface calling an interface I dealt with last year - NONE OF WHICH WERE NEEDED because it was a bloody hardcoded value in the end.

  • My cardinal rule in Go is just don't use interfaces unless you really, really need to and there's no other way. If you're using interfaces you're probably up to no good and writing Java-ish code in Go. (usually the right reason to use interfaces is exportability)

    Yes, not even for testing. Use monkey-patching instead.

Go is okay. I don't hate it but I certainly don't love it.

The packaging story is better than c++ or python but that's not saying much, the way it handles private repos is a colossal pain, and the fact that originally you had to have everything under one particular blessed directory and modules were an afterthought sure speaks volumes about the critical thinking (or lack thereof) that went into the design.

Also I miss being able to use exceptions.

  • When Go was new, having better package management than Python and C++ was saying a lot. I’m sure Go wasn’t the first, but there weren’t many mainstream languages that didn’t make you learn some imperative DSL just to add dependencies.

    • Sure, but all those languages didn't have the psychotic design that mandated all your code lives under $GOPATH for the first several versions.

      I'm not saying it's awful, it's just a pretty mid language, is all.

      6 replies →