Am 29.08.19 um 15:31 schrieb Adam Wight: > This is a solution I'd love to see explored. Subclassing is now considered > harmful, and it would be possible to refactor existing cases to use > interfaces, traits, composition, etc.
I wouldn't say subclassing is considered harmful in all cases. In fact, for extension points, subclassing is preferred over directly implementing interfaces. But subclassing should be used very carefully. It's the most tight form of coupling. It should be avoided if an alternative is readily available. But subclassing across module boundaries should be restricted to classes explicitly documented to act as extension points. If we could enforce this automatically, that would be excellent. -- Daniel Kinzler Principal Software Engineer, Core Platform Wikimedia Foundation _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
