The impoliteness of overriding methods

Benjamin Thaut code at benjamin-thaut.de
Thu Dec 20 02:23:14 PST 2012


Am 20.12.2012 10:44, schrieb sclytrack:
>
> I guess in the polite version you would make the call to the derived
> version here. The derived version wouldn't have to call super or anything.
>

The problem I have with the inner method is performance. With the super 
method you know which method to call at compile time. The call can even 
be inlined. With the inner method you have to do another vtable lookup 
for each inner call. If implemented it should be possible to choose on a 
per method basis which kind of overriding policy is used, in my opinion.

-- 
Kind Regards
Benjamin Thaut


More information about the Digitalmars-d mailing list