And, yes, I agree with Darren. In my words: I think it's arrogant to imagine that I can predict every future use of my code.
The last days I have struggled with the User Interface Application Block. Every attempt to make it do what I want has been effectively been stopped by a sealed class, an internal class or a static method. And the object creation happens deep down below the sea level. It's impossible to inject a specialized class into that mess. Not all classes can be correctly created from config information alone.
One major issue that Anders mentioned was performance issue. I think its easy to mitigate the performance issue by making hot methods non-virtual explicitly. Also this is applicable to only public methods. Its far more difficult to analyse every side effect of overriding every method by someone someway. The problem is that people does want to let their methods overridable but they don't have time to analyse effects and make promise that overriding would work normally. So the solution is compiler warning rather then making it fianl-by-default.
Flat View: This topic has 31 replies
on 3 pages