equivariant functions

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Oct 14 18:49:01 PDT 2008


Steven Schveighoffer wrote:
> "Denis Koroskin" wrote
>> Now that I thought about it a little more (please, see and comment my post 
>> about typeof(this) nearby), I agree that the issues are related.
>>
>> However, the best solution could be a combination of both.
>>
>> For example, I agree that interface IClonable should be as follows:
>>
>> interface IClonable { typeof(this) clone() const; }
> 
> No.  IClonable should be:
> 
> IClonable clone() const;

Nah, the whole goal is to have clone() in the base enforce that derivees 
implement it with the right signature...


Andrei



More information about the Digitalmars-d mailing list