3 ms·
I reckon that having a single operator would make it easier to pass through a custom comparer to whatever function you need. That is probably a better option th
by contravariant 7y ago
I reckon that having a single operator would make it easier to pass through a custom comparer to whatever function you need. That is probably a better option than changing the default <=> of a type.
For what it's worth the mathematical definition of partial orders suggests having NaN equivalent to NaN. You're not really forced to but giving up reflexivity doesn't seem worth it (unless you want to view each NaN a it's own object).
Interestingly mathematics only defines <= for a specific kind of object. Although on it's own this doesn't give you much information about what kind of relation it is.