The idea of "inheritance" is something that most students learn about early on when they are studying object-oriented programming (OOP). But one of the seminal books about OOP recommends favoring ...
In object-oriented programming, a class that has no more than one parent. Contrast with multiple inheritance. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction requires permission.
In object-oriented programming, a class that can contain more than one parent. Contrast with single inheritance. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction requires permission.
Is it possible that you are in fact referring to subtyping and not inheritance of attributes and members? Subtypes are great. So are typeclasses and interfaces, of course. For your usecase, a struct ...