Making `object.opEquals' replaceable
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Fri May 8 10:19:28 PDT 2015
On 5/8/15 10:11 AM, Manfred Nowak wrote:
> Kapps wrote:
>> It's a performance benefit.
>
> There is no proof that every replacing mechanism necessarily degrades
> performance. Please recall, that for implmenting a side effect on all
> checked pairs of elements of a class, a virtual call is necassary anyway.
The right answer to this is: opEquals is currently not replaceable and
there are no plans to make it so. D is so flexible, people in this forum
tend to take it for granted that any theoretical flexibility ought to be
realized. There is, however, value in drawing boundaries, too.
Manfred, you will need to find other means to achieve what you need to do.
Andrei
More information about the Digitalmars-d
mailing list