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