WAT: opCmp and opEquals woes

via Digitalmars-d digitalmars-d at puremagic.com
Sat Jul 26 06:09:36 PDT 2014


On Saturday, 26 July 2014 at 12:19:41 UTC, Marc Schütz wrote:
> I somehow took your response as disagreement with him.

No, I think it is useful to have a default total sort order for 
types even if the order isn't natural and might appear arbitrary. 
It is useful in binary trees etc.

That does not mean that you should also define comparison and 
equality, just because you have a default total order for sorting.

The constraints put on comparison operators are too restrictive 
for domain specific types (such as fuzzy numbers, intervals etc)


More information about the Digitalmars-d mailing list