2 ms·
I'll start. Inheritance should only be from an interface. None of these virtual inheritance problems where spagetti code can happen by calling functions that do
by ProtocolAuthor 6y ago
I'll start. Inheritance should only be from an interface. None of these virtual inheritance problems where spagetti code can happen by calling functions that don't document what virtual functions the inner implementation may use. That problem becomes a pain and composition over inheritance is suitable for the times you need it https://en.wikipedia.org/wiki/Composition_over_inheritance https://en.wikipedia.org/wiki/Composition_over_inheritance