I was thinking of trying out a complex number type. I was planning a ComplexNumeric protocol that parallels Numeric. But looking further, since Numeric does not refine Comparable, I could base ComplexNumeric off of SignedNumeric directly. This is OK as long as no code assumes that Numeric means that a conforming type models (a subset of) real numbers.
Is not assuming a conforming type models real numbers OK? If so, should we add a RealNumber empty protocol (that all current numeric types would conform to) to differentiate real-number types and other mathematical types?
i doubt it, any algorithm that requires comparing two Numerics is also going to require Comparable and if your complex type doesn’t conform to Comparable then none of that code will assume it