Old problem with performance

Weed resume755 at mail.ru
Sun Feb 8 06:30:08 PST 2009


Denis Koroskin пишет:

>>
>> [skip]
>>
>>> Apparently, it doesn't work at the moment because ctor can't be a
>>> template :(
>>> Is there an enhancement request in bugzilla? It prevents this pattern
>>> from working.
>>
>> + it is difficult and also it will be even more difficult if it will be
>> necessary to make support for the construction like:
>>
>> space_ship_1.calculatePathTo("Moon").getCheckpoint(3).getCoords;
>>
>> In this example we create a temporary class "path", create temporary
>> class "checkpoint" and we take coords of checkpoint of this path. It is
>> not expedient to us to store all this path and checkpoint because it is
>> vary.
>>
>> (from
>> http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=81432)
>>
> 
> I believe you should stick with structs for that.
> 

Let's assume, polymorphism is necessary to these objects



More information about the Digitalmars-d mailing list