WAT: opCmp and opEquals woes

Ola Fosheim Gr via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 27 23:31:47 PDT 2014


On Monday, 28 July 2014 at 06:05:03 UTC, Fool wrote:
> So D has to separate opEquals and opCmp since otherwise a user 
> could not define floating-point 'equality' and 'comparison' 
> himself in the same way as it is defined by the language.
>
> I'm convinced know. :-)

But opCmp does not affect <> and !<>, which is the closest you 
get to equivalence?

Then again NaN is really bottom, not a proper value, but an 
exceptional state...




More information about the Digitalmars-d mailing list