What does C++ do better than D? - StackOverflow.com
bearophile
bearophileHUGS at lycos.com
Sat Jul 30 07:16:49 PDT 2011
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
More information about the Digitalmars-d
mailing list