3 ms·
> 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.
by riobard 1mo 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.
- Zanfa 1mo agoBut you can do equally horrible inheritance-y things with embedded structs.
- metadat 1mo agoYes, though it's non-idiomatic and in my experience, rare to encounter in the wild for anything you'd actually want to use.
- saturn_vk 1mo agoThat’s composition, and it’s not really the same as inheritance
- EspressoGPT 1mo agoThat's right, embedded structs in Go are far less common than inheritance in Java though.