4 ms·
I'm very aware of the fragile base class problem. But it's a non-problem for many of the small class hierarchies that protocol-oriented programming examples are
by WoodenChair 7y ago
I'm very aware of the fragile base class problem. But it's a non-problem for many of the small class hierarchies that protocol-oriented programming examples are often used as examples of replacing. Surely, there would be no fragile base class problem here with a total of 1 base class and 3 subclasses.
If you're doing something like the Swift standard library, protocol-oriented programming is a huge win. If you're doing a small class hierarchy as you would be to do this example, I don't see the big win.