3 ms·
This is fairly the premise of OOP on display. And fairly basic at that. Im not sure whats to be learned here except that in the real world, your representatio
by greatsuccess 13y ago
This is fairly the premise of OOP on display. And fairly basic at that. Im not sure whats to be learned here except that in the real world, your representations will always need to be extended and subclassing is usually a bad hammer.
Interfaces are better but extend poorly through subclassing as well.
Composition is infinite but difficult to define over time when things change (usually resorts to more subclassing or more injection strategies).
I wish this article were valuable to solving the actual problem but its just a primer on OOP vs using primitives which is not particularly instructive or useful to solving real world problems.