3 ms·
> ...C++, where inheritance and polymorphism are welded to one another Technically there many ways to have polymorphism in C++ without inheritance and virtual
by humanrebar 10y ago
> ...C++, where inheritance and polymorphism are welded to one another
Technically there many ways to have polymorphism in C++ without inheritance and virtual methods (closures, templates, tagged unions, etc.). In practice, students learn about polymorphism from OOP textbooks and conflate polymorphism and inheritance.
The work on 'concepts' for (maybe) C++20 fits more nicely with subtyping and LSP, it sounds like.