3 ms·
In my programming career, I had several situations where a base class made a lot of sense, with a dozen derived classes only implementing specific functionality
by inglor_cz 6y ago
In my programming career, I had several situations where a base class made a lot of sense, with a dozen derived classes only implementing specific functionality. They were mostly algorithm-related.
OO makes a lot of sense in hierarchic structures.
- Kinrany 6y agoIt's a good practice to make the base class abstract. With that in mind, this pattern cleanly maps onto a trait with default implementations for methods plus several structs that implement the trait.