What does C++ do better than D? - StackOverflow.com

Jesse Phillips jessekphillips+D at gmail.com
Sat Jul 30 09:16:40 PDT 2011


bearophile Wrote:

> Jonathan M Davis:
> 
> This is part 7 of your answer:
> 
> >Member functions of classes are polymorphic by default. You can't declare them non-virtual. It's up to the compiler to decide if they can be (which really is only the case if they're final and aren't overriding a function from a base class). So, that could be a performance problem in some cases. However, if you really don't need the polymorphism, then all you have to do is use structs, and it's not an issue.<
> 
> Do you want to declare a class member non-virtual but non-final too?
> 
> Bye,
> bearophile

Yes, because I like chioce and I chuze to spell words fishsticks.


More information about the Digitalmars-d mailing list