Old problem with performance

Michel Fortin michel.fortin at michelf.com
Mon Feb 9 16:29:27 PST 2009


On 2009-02-09 16:02:10 -0500, "Denis Koroskin" <2korden at gmail.com> said:

>> The one case I could think of was the strategy pattern: no data is 
>> added  (including, no virtual functions) -- the only thing that's added 
>> is a  different implementation of an existing virtual function. In such 
>> a  situation, the slicing problem cannot happen.
> 
> Michel has posted (2 posts up) an example of a class that happen to 
> have no member fields at all (virtual methods only). And yet it still 
> suffers from slicing.

Indeed. But that's in C++. It could certainly be possible to make that 
work differently in another language. I'm not sure it's worth it for D 
though.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list