[swift-evolution] [Accepted] SE-0104: Protocol-oriented integers
nevin.brackettrozinsky at gmail.com
Thu Mar 2 10:48:59 CST 2017
Also not core team, but I didn’t realize this was missing during the
review. If I had I would have spoken up, because mathematically a magnitude
is *defined* as something that can be compared to see which underlying
object is bigger.
It is a measure of size, and it exists so that the sizes of objects can be
compared. Semantically, anything which is a magnitude must be comparable.
Putting that another way, if someone were to implement a type by giving it
a magnitude which wasn’t comparable, then that type should not be
Even *vectors spaces*, where the objects aren’t even numeric because they
can’t be multiplied together, still have magnitudes which are comparable
since they must obey the triangle inequality.
I think the omission of ‘Comparable’ from ‘Magnitude’ should be considered
a bug in the proposal, and it should be amended as an obvious fix for an
oversight. Again, a magnitude is a measure of size, and it exists for the
purpose of being compared.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution