Unlike Java, why does C# treat methods as non-virtual functions by default? Is it more likely to be a performance issue rather than other possible outcomes?
I am reminded of reading a paragraph from Anders Hejlsberg about several advantages the existing architecture is bringing out. But, what about side effects? Is it really a good trade-off to have non-virtual methods by default?
Classes should be designed for inheritance to be able to take advantage of it. Having methods
virtualby default means that every function in the class can be plugged out and replaced by another, which is not really a good thing. Many people even believe that classes should have beensealedby default.virtualmethods can also have a slight performance implication. This is not likely to be the primary reason, however.