Old problem with performance
Christopher Wright
dhasenan at gmail.com
Tue Feb 24 04:23:44 PST 2009
Kagamin wrote:
> Weed Wrote:
>
>>>> But why not allow this operation at the same speed that allows C++?
>>> If you pass it by value you'll lose polymorphism.
>> It is possible that this polymorphism is not needed and should be
>> prohibited for operations by value. The class is ready, why it should
>> not be used and have to redo it?
>>
>> Can not think about changing when the class is ready - he could have
>> enormous complexity and hierarchy.
>
> It's probably already designed to be reference-type. I think, you'll have big troubles trying to change its semantic to value-type and effectively you'll have to redo it.
In other words, it is not always easy to translate C++ to D. It's
probably not worthwhile to translate any large codebase into another
programming language, in most cases, and if you do, you will probably
need to rewrite large portions of it anyway.
More information about the Digitalmars-d
mailing list