Getting rid of dynamic polymorphism and classes

Tommi tommitissari at hotmail.com
Thu Nov 8 14:38:53 PST 2012


On Thursday, 8 November 2012 at 21:43:32 UTC, Max Klyga wrote:
> Dinamic polimorphism isn't gone anywhere, it was just shifted 
> to delegates.

But there's no restrictive type hierarchy that causes unnecessary 
coupling. Also, compared to virtual functions, there's no 
overhead from the vtable lookup. Shape doesn't need to search for 
the correct member function pointer, it already has it.

It's either that, or else I've misunderstood how virtual 
functions work.


More information about the Digitalmars-d mailing list