3 ms·
If by extending you mean that you want to have a type that includes ALL the functionality of another type, without needing to fill in each method, that's alread
by bostik 4y ago
If by extending you mean that you want to have a type that includes ALL the functionality of another type, without needing to fill in each method, that's already supported.
In your new struct definition, include the desired base type as a member - without giving it a name. That embeds the unnamed member directly, and your new type automatically gets all the interfaces and their underlying implementations. As a python-person I always found this a somewhat odd mechanism, but from a functionality perspective it satisfies what I have wanted to do.
Guess that's what people mean by composability.