2 ms·
Many respectable people has been making a case to avoid inheritance[1][2]. Unfortunately, class inheritance is the only way to create the equivalent of an inte
by danieldk 12y ago
Many respectable people has been making a case to avoid inheritance[1][2].
Unfortunately, class inheritance is the only way to create the equivalent of an interface or (Scala-type) trait in C++. So, even if you avoid class inheritance in general (which is a good thing IMO), you still end up doing inheritance if you want run-time polymorphism in the form of abstract classes or abstract base classes.