Stroustrup is disappointed with D :(

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 22 14:25:05 PDT 2015


On Tuesday, 22 September 2015 at 19:52:48 UTC, Ola Fosheim 
Grøstad wrote:
> On Tuesday, 22 September 2015 at 19:38:35 UTC, Ali Çehreli 
> wrote:
>> C++'s approach is better from the point of view of corretness. 
>> However, it is slower because the object's vtbl pointer must 
>> be stamped several times during construction. (I am not aware 
>> of available compiler optimizations there.)
>
> No dispatch needed if calls it's own functions, so no vtable 
> needed for the constructor. But neither approach is good for 
> correctness.
>

You can call super, so you need the virtual dispatch.


More information about the Digitalmars-d mailing list