Slow performance compared to C++, ideas?

Jonathan M Davis jmdavisProg at gmx.com
Mon Jun 3 01:20:30 PDT 2013


On Monday, June 03, 2013 10:11:26 deadalnix wrote:
> The whole concept of OOP revolve around the fact that a given
> class and users of the given class don't need to know about its
> subclasses (Liskov's substitution principle). It is subclass's
> responsibility to decide what it override or not, not the upper
> class to decide what is overriden by subclasses.

It's the base class' job to define the API that derived classes will be 
overriding and the derived classes' choice as to exactly which functions they 
override (assuming that they're not abstract and therefore have to be 
overridden). That doesn't mean that the base class can't or shouldn't have 
other functions which are not intended to be overridden. Nothing about 
Liskov's substitution principle requires that the entire API of the base class 
be polymorphic.

- Jonathan M Davis


More information about the Digitalmars-d mailing list