https://issues.dlang.org/show_bug.cgi?id=17418
Issue ID: 17418
Summary: opCmp return value unclear
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P1
Component: dlang.org
Assignee: [email protected]
Reporter: [email protected]
When implementing an opCmp, I pretty much always need to look up how it is
defined and the specification constantly disappoints but not saying a word of
what the function should actually return for which case.
you can kind of extract that info from the re-write rules, but why make it so
difficult and not just say something like
RETURN A B
-1 2 1
0 2 2
+1 1 2
(or whatever the correct numbers are)
Link to unclear definition:
http://dlang.org/spec/operatoroverloading.html#compare
--