4 ms·
Yes, like "Opening Brace Can't Be Placed on a Separate Line" (from your link). Everyone can read Go code and understand what happens. There are some minor diff
by KingOfCoders 2y ago
Yes, like "Opening Brace Can't Be Placed on a Separate Line" (from your link).
Everyone can read Go code and understand what happens. There are some minor difficulties like func (*A) vs func (A).,
- eru 2y agoRiscV assembly is even easier to read by that metric.
- KingOfCoders 2y agoMy assembler days were 4 decades ago, but "Everyone can read Go code and understand what happens." There seems to be a difference between "easy to read" and "understand what happens" - or what happens on what level. The challenge is that there is a tradeoff between the two. Assembler is too low to understand what "really" happens, on the other hand Haskell for example with Monad stacks is again very easy to read + understand what happens "most of the time", but hard to understand all the abstracted away side effects. In Haskell with add 3 5 everything can happen beside what you see. In assembler ld a, 3 add a, 5 nothing happens except these two instructions. The tradeoff is how much you want to be explicit, with the downside of creating too much noise, and how much you want to abstract away, with the downside of magic happening somewhere.
- eru 2y agoYes. And to be less snarky: Go doesn't really sit on the efficiency frontier here: It requires you to write a lot of stuff by hand and is incredibly verbose, but it also does a lot of magic behind the scenes.