Re:Inheritance is evil, and must be destroyed: part 1
by dangph on Saturday October 13, 2007 @12:44AM
(#67193)
> The article mentions the strategy pattern which, ironically, often requires inheritance to implement.
Not really. It only requires interface inheritance for statically-typed languages, which is not really inheritance, and no inheritance at all for duck-typed languages.
Sometimes when you are using a framework, the productivity gained from inheritance cannot be ignored. I suppose this depends on the language and framework design, to a limited extent.
That said, I try to compose rather than inherit when possible, as it provides a more opaque implementation.