[swift-evolution] [Accepted] SE-0104: Protocol-oriented integers

Björn Forster bjoern.forster at googlemail.com
Thu Mar 2 11:31:33 CST 2017

While it is true that the complex number itself is not comparable, the
magnitude of a complex number is only a scalar, and therefore it's
magnitude IS comparable.
It's only about the comparability of the magnitude, not about the number
itself. The number might actually not be comparable.

Kind Regards,

On Thu, Mar 2, 2017 at 6:21 PM, Joe Groff <jgroff at apple.com> wrote:

> On Mar 2, 2017, at 6:22 AM, Björn Forster <bjoern.forster at googlemail.com>
> wrote:
> Hello Joe,
> I wanted to ask kindly if it would be possible that the core team adds to
> the rationale the design decision behind
>   associatedtype Magnitude : Equatable, ExpressibleByIntegerLiteral
> being not comparable. It was pointed out by several reviewers that it is
> against all intuition that a scalar is not comparable and therefore pretty
> much useless.
> It would be great if you could add the thoughts of the core team regarding
> this to the rationale to document the reasons behind it.
> Complex numbers have magnitude, but aren't comparable.
> -Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170302/970695b6/attachment.html>

More information about the swift-evolution mailing list