Designed Inheritance vs. Open Inheritance
Fowler talks about Designed Inheritance, and he quotes the best argument for it that I have heard so far:
That is a very good reason to use designed inheritance, if you assume that your users are non experts. However, I really don't like the fact that you make this assumtion. Especially for framework (or library for general consumtion) building. There are experts who need minute control over every aspect of the library.
There is a reason why Rhino Commons has a [ThereBeDragons] attribute. There are things that I didn't think about when I wrote the class, and I expect users to go beyond what I meant (otherwise, what is the point?). They know that by going beyond the normal parameters of the library, they may get unexpected results.
It seems that this is what Fowler is talking about when he comments about "un-sealing" the class. Something that I would dearly love to be able to do.
Comments
Comment preview