If you had money to place for a bounty, what would you choose?

Nick nmsmith65 at gmail.com
Wed Dec 4 01:14:26 PST 2013


On Wednesday, 4 December 2013 at 07:00:58 UTC, Manu wrote:
> The majority of functions in most OOP classes are properties 
> and trivial
> accessors which should almost never be virtual. Imagine, making 
> virtual
> function calls to access trivial properties? They can't be 
> inlined anymore;
> inlining trivial accessors is one of the most important 
> optimisations for
> OOP that there is.

This is an absolutely important point that should be considered 
the foundation for the argument for final-by-default. Your 
average programmer is NOT going to tag everything as final, and 
the cost of virtual accessors could be tremendous. There's no 
argument for virtual-by-default that is nearly as powerful as 
this.


More information about the Digitalmars-d mailing list