3 ms·
I skimmed a lot of low quality C++ intro books to try and find some good ones for beginning students. Slim pickings. I recognized this pattern of solving some
by vnorilo 5y ago
I skimmed a lot of low quality C++ intro books to try and find some good ones for beginning students. Slim pickings.
I recognized this pattern of solving some ridicilous non-problem to exhibit inheritance very early on. The message readers get from that is that inheritance is OOP, and the main thing is to first think what could inherit from what. This is not a fault in OOP itself, just a very bad approach to teaching it.
In my teaching I always wanted to start from a problem that required single dispatch runtime polymorphism and introduced pure abstract classes (interface and implementations) as the means of accomplishing that. I felt that if there was just one C++ class programming pattern they ought to pick up, that was it.
- Gibbon1 5y agoI feel like generics without type erasure actually solves the problem that inheritance was supposed to solve without creating a swamp of dependencies.