3 ms·
What would extension methods, and extension state have over inheritance at that point? Those restrictions are in place for a reason.
by UK-Al05 7y ago
What would extension methods, and extension state have over inheritance at that point? Those restrictions are in place for a reason.
- headmelted 7y agoThey are in place for a reason, but how much of the reason is due to decisions that are already set in stone is kind of my question? It's kind of agreed that object composition is a design goal we should be reaching for but are stopped frustratingly short of being able to compose objects from smaller components directly, so the design has to be top-down (class-based inheritance) rather than bottom-up (object composition). It's also cleaner than dependency injection as you wouldn't need to pre-specify what a class hierarchy can or cannot be composed of at top level.