3 ms·
> something i like about go is it shepards you to write code any other go programmer can follow easily Sure, the syntax and indentation levels are all the same
by capableweb 7y ago
> something i like about go is it shepards you to write code any other go programmer can follow easily
Sure, the syntax and indentation levels are all the same, but that's not really the difficult parts of programming. The difficulty comes from abstractions, indirections and other abstract things that Go, just as any language, let's you do however you want.
There are of course codebases made in Go where the indirections makes no sense and are hard to follow, just as in any language.
What Go shepards you into is to make really verbose code (well, compared to most languages except Java I guess), where everything is explicit, unless hidden by indirection. This is both a blessing and a curse.
- tmountain 7y agoGo limits the number of available abstractions--yes at the cost of verbosity--but compared to a language like C++, it's minuscule in its size. The end result is that you can keep the entire language in your head, and you don't have to go digging into the bowels of the internet to figure out how "turing complete template metaprogramming" works since the last developer decide to use that cool feature they just discovered.
- capableweb 7y ago> Go limits the number of available abstractions Again, it doesn't, as abstractions are not built from syntax of the language but from the indirections developers create with the syntax provided. I agree that the abstractions the standard library provides are smaller than in other languages, but outside of that, anyone can create their own abstractions (as it should be).
- wtetzner 7y agoI would say Go doesn't limit the number of abstractions, it limits the number of ways in which abstractions can be created. Or maybe better put, it doesn't provide a very rich set of abstraction facilities.
- tomlu 7y agoAnecdotally I always find Go code bases very easy to read compared to almost any other language. Is it not reasonable to assume this is because of "shepherding"? Otherwise other effect would cause this? Perhaps my sample is unrepresentative, or perhaps Go programmers are somehow more competent?
- joelfolksy 7y agoDo you find it easier to read or to understand? I find Brainfuck code incredibly easy to read (there are only eight characters/commands in the language!) but almost impossible to understand.
- tomlu 7y agoI find it both easier to read and to understand.