WAT: opCmp and opEquals woes

Regan Heath via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 28 02:39:58 PDT 2014


On Sat, 26 Jul 2014 05:22:26 +0100, Walter Bright  
<newshound2 at digitalmars.com> wrote:
> If you don't want to accept that equality and comparison are  
> fundamentally different operations, I can only repeat saying the same  
> things.

For the majority of use cases they are *not* in fact fundamentally  
different.

You're correct, they are *actually* fundamentally different at a  
conceptual/theoretical level, but this difference is irrelevant in the  
majority of cases.

It is true that we need to be able to define/model this difference (which  
is why we have both opCmp and opEquals) but it is *not* true that every  
user, for every object, needs to be aware of and cope with this difference.

R

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/


More information about the Digitalmars-d mailing list