virtual-by-default rant

deadalnix deadalnix at gmail.com
Sun Mar 18 06:41:47 PDT 2012


Le 18/03/2012 03:47, F i L a écrit :
> I'm a bit confused. Reading through the virtual function's docs
> (http://dlang.org/function.html#virtual-functions) it says:
>
> "All non-static non-private non-template member functions are virtual.
> This may sound inefficient, but since the D compiler knows all of the
> class hierarchy when generating code, all functions that are not
> overridden can be optimized to be non-virtual."
>

The compiler can. But ATM, it doesn't.

This is an implementation issue, not a language design issue.


More information about the Digitalmars-d mailing list