Hacker News new | ask | show | jobs
by riobard 100 days ago
> inherited from 10 levels of parent classes

This is not (yet) a thing in Go. Go does not have classes and inheritance. Interface is more like duck-typing.

1 comments

But you can do equally horrible inheritance-y things with embedded structs.
That’s composition, and it’s not really the same as inheritance
Yes, though it's non-idiomatic and in my experience, rare to encounter in the wild for anything you'd actually want to use.
That's right, embedded structs in Go are far less common than inheritance in Java though.