Old problem with performance

Weed resume755 at mail.ru
Mon Feb 9 05:35:43 PST 2009


Christopher Wright пишет:
> Weed wrote:
>> And if I need some different such combinations? For each it is necessary
>> to write such 8-10 lines? This is terrible!
> 
> You need to add those lines for every method you need virtual dispatch
> with for your value type. It's an overhead of three lines per method,
> two for the interface (declaration and member), and one extra line where
> you create the struct. If you're reasonable, your struct constructor
> will create a default instance.
> 
> So, it's not that great an overhead.

Do not be surprised that so many continue to write in C++! :)



More information about the Digitalmars-d mailing list