by grey-area · 1y ago · 0 comments
Go’s lack of inheritance is one of its bolder decisions and I think has been proven entirely correct in use.
Instead of the incidental complexity encouraged by pointless inheritance hierarchies we go back to structure which bundle data and behaviour and can compose them instead.
Favouring composition over inheritance is not a new idea nor did it come from the authors of Go.
Also the author of Java (Gosling) disagrees with you.
https://www.infoworld.com/article/2160788/why-extends-is-evi...
Structs and interfaces replace classes just fine.
Reuse is really very easy and I use it for several monoliths currently. Have you tried any of the things you’re talking about with go?