Skip to main content

Posts

Showing posts with the label virtual-functions

Why C# implements methods as non-virtual by default?

Unlike Java, why C# treats methods as non-virtual functions by default? Is it more likely to be a performance issue rather than other possible outcomes? I remind reading a paragraph from Anders Hejlsberg about the 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?