WAT: opCmp and opEquals woes

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 25 13:32:42 PDT 2014


On 7/25/2014 5:08 AM, Jacob Carlborg wrote:
> I see no reason why I should define opEquals when opCmp was used for AA keys.
> You keep ignoring that argument.

Allow me to repeat:

"The thing is, either this suffers from == behaving differently than AAs, or 
you've made opEquals superfluous by defining it to be opCmp==0. The latter is a 
mistake, as Andrei has pointed out, as opCmp may not have a concept of equality, 
and opEquals may not have a concept of ordering."

This is the crux of the matter.



More information about the Digitalmars-d mailing list