<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">The Magnitude requirement was meant to be just Numeric (which does not refine Comparable), and only due to the lack of recursive constraints was desugared into Equatable and ExpressibleByIntegerLiteral.</div><div class="">Nevin has a very valid point that the very definition of Magnitude is about the ordering of things. FWIW, FloatingPoint defines Magnitude as Comparable (even though I could not find uses for it).</div><div class="">TL;DR: <font face="SFMono-Regular" class="">associatedtype Magnitude : Numeric, Comparable</font>&nbsp;seems to be the right thing to do, after all.</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 2, 2017, at 9:23 AM, Björn Forster via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Joe,<div class="">the point made here is about the magnitude of complex numbers.</div><div class="">The magnitude of one complex number can be compared to the magnitude of a second number.</div><div class=""><br class=""></div><div class="">Kind Regards</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Mar 2, 2017 at 6:21 PM, Joe Groff <span dir="ltr" class="">&lt;<a href="mailto:jgroff@apple.com" target="_blank" class="">jgroff@apple.com</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><span class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 2, 2017, at 6:22 AM, Björn Forster &lt;<a href="mailto:bjoern.forster@googlemail.com" target="_blank" class="">bjoern.forster@googlemail.com</a><wbr class="">&gt; wrote:</div><br class="m_-7084591095535064422Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hello Joe,<div class="">I wanted to ask kindly if it would be possible that the core team adds to the rationale the design decision behind&nbsp;</div><div class=""><pre style="box-sizing:border-box;font-family:sfmono-regular,consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:13.6px;margin-top:0px;margin-bottom:0px;font-stretch:normal;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(246,248,250);border-radius:3px;word-break:normal;color:rgb(36,41,46)" class="">  <span class="m_-7084591095535064422gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">associatedtype</span> <span class="m_-7084591095535064422gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179)">Magnitude</span> : <span class="m_-7084591095535064422gmail-pl-e" style="box-sizing:border-box;color:rgb(121,93,163)"><span class="m_-7084591095535064422gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179)">Equatable</span></span>, <span class="m_-7084591095535064422gmail-pl-e" style="box-sizing:border-box;color:rgb(121,93,163)"><span class="m_-7084591095535064422gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179)">ExpressibleByIntegerLiteral</span></span></pre></div><div class="">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.</div><div class=""><br class=""></div><div class="">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.</div></div></div></blockquote><br class=""></div></span><div class="">Complex numbers have magnitude, but aren't comparable.</div><span class="HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div><div class="">-Joe</div><br class=""></font></span></div></blockquote></div><br class=""></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>