<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 22, 2016, at 9:10 PM, Xiaodi Wu &lt;<a href="mailto:xiaodi.wu@gmail.com" class="">xiaodi.wu@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">On Fri, Jul 22, 2016 at 9:08 PM, Matthew Johnson <span dir="ltr" class="">&lt;<a href="mailto:matthew@anandabits.com" target="_blank" class="">matthew@anandabits.com</a>&gt;</span> wrote:<br class=""><div class="gmail_extra"><div class="gmail_quote"><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=""><br class=""><div class=""><span class=""><blockquote type="cite" class=""><div class="">On Jul 22, 2016, at 9:04 PM, Xiaodi Wu &lt;<a href="mailto:xiaodi.wu@gmail.com" target="_blank" class="">xiaodi.wu@gmail.com</a>&gt; wrote:</div><br class=""><div class=""><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">On Fri, Jul 22, 2016 at 8:57 PM, Matthew Johnson<span class="">&nbsp;</span><span dir="ltr" class="">&lt;<a href="mailto:matthew@anandabits.com" target="_blank" class="">matthew@anandabits.com</a>&gt;</span><span class="">&nbsp;</span>wrote:<br class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><br class=""><div class=""><span class=""><blockquote type="cite" class=""><div class="">On Jul 22, 2016, at 8:54 PM, Xiaodi Wu via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class=""><div class=""><div dir="ltr" class="">On Fri, Jul 22, 2016 at 8:52 PM, Jaden Geller via swift-evolution<span class="">&nbsp;</span><span dir="ltr" class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt;</span><span class="">&nbsp;</span>wrote:<br class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word" class="">"The totalOrder predicate will order these cases, and it also distinguishes between different representations of NaNs and between the same decimal floating point number encoded in different ways."<div class="">- [Wikipedia](<a href="https://en.wikipedia.org/wiki/IEEE_floating_point#Total-ordering_predicate" target="_blank" class="">https://en.wikipedia.org/wiki/IEEE_floating_point#Total-ordering_predicate</a>)<br class=""><div class=""><br class=""></div><div class="">Sounds like `===` should not return `true` for zeros of different signs, then.</div></div></div></blockquote><div class=""><br class=""></div><div class="">Fair enough; the result of that will be, as Pyry noted above, that:</div><div class=""><br class=""></div><div class="">```</div><div class=""><span style="font-size:13px" class="">[-0.0, 1.0, .nan, 0.0].firstIndex(of: 0.0)</span>&nbsp;<span style="font-size:13px" class="">//=&gt; 3, not 0</span></div><div class=""><span style="font-size:13px" class="">```</span></div></div></div></div></div></blockquote><div class=""><br class=""></div></span><div class="">Maybe we need floating point specific implementations of some algorithms to resolve this problem?</div><div class=""><br class=""></div><div class="">It doesn’t seem like there is a way to provide the semantics required by generic algorithms and still provide the expected behavior for floating point values. &nbsp;</div></div></div></blockquote><div class=""><br class=""></div><div class="">Well, what I'm trying to say is that generic algorithms such as `index(of:)` require only an equivalence relation. For floating point types, there are three ways to slice it:</div><div class=""><br class=""></div><div class="">1. NaN != NaN and +0 == -0 [what the traditional comparison operators are constrained to do]</div><div class="">2. NaN == NaN, +0 == -0, and the same number encoded different ways compare equal</div><div class="">3. NaN == NaN, +0 != -0, and the same number encoded different ways compare not equal</div><div class=""><br class=""></div><div class="">Both #2 and #3 can fall out of valid equivalence relations; if `===` behaved like #2 for FloatingPoint types, then generic algorithms work just fine. If we insist on using a total ordering defined by `&lt;=&gt;` all the time, then we've got problems.</div></div></div></div></div></blockquote><div class=""><br class=""></div></span><div class="">And if we don’t then we’re back to 3 different concepts of equality.&nbsp; There is definitely a tradeoff no matter what we choose.</div></div></div></blockquote><div class=""><br class=""></div><div class="">If some types have three concepts of equality, each with their particular use, why must we eliminate one of them?</div></div></div></div></div></blockquote><div><br class=""></div><div>This isn’t about eliminating concepts of equality for a type. &nbsp;They can have 42 if they want. &nbsp;</div><div><br class=""></div><div>This is about the right way to define the semantics of specific protocols. &nbsp;It says nothing about additional notions of equality a type may have available.</div><div><br class=""></div><div>The difficulty is finding a design for the protocols that makes sense with floating point types because we want them to be able to conform to the protocols.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">&nbsp;</div><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=""><div class=""><div class=""><div class="h5"><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><div class=""><div class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><div class=""><div class=""><div class=""><div class=""><blockquote type="cite" class=""><div class="">On Jul 22, 2016, at 6:48 PM, Dave Abrahams via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class=""><div class=""><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><span style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline" class="">on Fri Jul 22 2016, Jaden Geller &lt;</span><a href="mailto:swift-evolution@swift.org" style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank" class="">swift-evolution@swift.org</a><span style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline" class="">&gt; wrote:</span><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><blockquote type="cite" style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><blockquote type="cite" class="">For floating point, I'd hope that `a === b` if `(a &lt;=&gt; b) == .same`<br class="">*but not iff*. This is to satisfy IEEE 754: "Comparisons shall<br class="">ignore the sign of zero (so +0 = −0)".<br class=""></blockquote><br class="">I don't see why both `(+0) === (-0)` and `(+0) &lt;=&gt; (-0)` can't return<br class="">`true` and `.same`, respectively. This doesn't break the total<br class="">ordering of values. `===` doesn't do raw memory comparison. They're<br class="">"identical", so it ought to return `true`.<br class=""></blockquote><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><span style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline" class="">It ought to do whatever IEEE-754 specifies that its total ordering test</span><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><span style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline" class="">does.&nbsp; That is, IEEE-754 gets to decide whether the difference between</span><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><span style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline" class="">+0 and -0 is “essential” to IEEE-754 floating point types, or not.</span><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><blockquote type="cite" style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><br class=""><blockquote type="cite" class="">On Jul 22, 2016, at 6:37 PM, Xiaodi Wu via swift-evolution<br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class="">On Fri, Jul 22, 2016 at 8:20 PM, Dave Abrahams via swift-evolution<br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;&gt;<br class="">wrote:<br class=""><br class="">on Fri Jul 22 2016, Daniel Duan &lt;<a href="http://daniel-at-duan.org/" target="_blank" class="">daniel-AT-duan.org</a>&gt; wrote:<br class=""><br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">On Jul 22, 2016, at 3:00 PM, Dave Abrahams via swift-evolution<br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;&gt;<br class="">wrote:<br class=""><br class=""><br class="">on Fri Jul 22 2016, Daniel Duan<br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;<br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;&gt;&gt;<br class="">wrote:<br class=""><br class=""></blockquote><br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">On Jul 22, 2016, at 11:05 AM, Dave Abrahams via swift-evolution<br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;<br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;&gt;&gt;<br class="">wrote:<br class=""><br class=""><br class="">on Thu Jul 21 2016, Duan<br class=""></blockquote><br class=""><blockquote type="cite" class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;<br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;&gt;<br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;<br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;&gt;&gt;&gt;<br class="">wrote:<br class=""><br class=""><blockquote type="cite" class="">Great proposal. I want to second that areSame may mislead user to<br class="">think this is about identity.<br class=""><br class="">I like areEquivalent() but there may be better names.<br class=""></blockquote><br class="">It really *is* about identity as I posted in a previous message.&nbsp; But<br class="">that doesn't change the fact that areEquivalent might be a better name.<br class="">It's one of the things we considered; it just seemed long for no real<br class="">benefit.<br class=""><br class=""></blockquote><br class="">If the addresses of the arguments aren’t being used, then we don’t consider<br class="">them part of their *identity*. I can follow this logic. My fear is most users<br class="">won’t make this leap on their own and get the same initial impression as I did.<br class="">It's entirely possible this fear is unfounded. Some educated bikesheding<br class="">wouldn't hurt here IMO :)<br class=""></blockquote><br class="">Well, it's still a very real question whether we ought to have the<br class="">additional API surface implied by areSame, or wether we should collapse<br class="">it with ===.<br class=""><br class=""></blockquote><br class="">To spell this out (because I had to think about it for a second): === will be derived from<br class="">&lt;=&gt;,<br class="">but also becomes default implementation for ==, which remains open for<br class="">customization.<br class=""></blockquote><br class="">I was imagining roughly this (untested):<br class=""><br class="">&nbsp;/// Two references are identical if they refer to the same<br class="">&nbsp;/// instance.<br class="">&nbsp;///<br class="">&nbsp;/// - Note: Classes with a more-refined notion of “identical”<br class="">&nbsp;/// &nbsp;&nbsp;should conform to `Identifiable` and implement `===`.<br class="">&nbsp;func ===(lhs: AnyObject, rhs: AnyObject) -&gt; Bool {<br class="">&nbsp;&nbsp;&nbsp;ObjectIdentifier(lhs) == ObjectIdentifier(rhs)<br class="">&nbsp;}<br class=""><br class="">&nbsp;/// Supports testing that two values of `Self` are identical<br class="">&nbsp;///<br class="">&nbsp;/// If `a` and `b` are of type `Self`, `a === b` means that<br class="">&nbsp;/// `a` and `b` are interchangeable in most code.&nbsp; A conforming<br class="">&nbsp;/// type can document that specific observable characteristics<br class="">&nbsp;/// (such as the `capacity` of an `Array`) are inessential and<br class="">&nbsp;/// thus not to be considered as part of the interchangeability<br class="">&nbsp;/// guarantee.<br class="">&nbsp;///<br class="">&nbsp;/// - Requires: `===` induces an equivalence relation over<br class="">&nbsp;/// &nbsp;&nbsp;instances.<br class="">&nbsp;/// - Note: conforming types will gain an `==` operator that<br class="">&nbsp;/// &nbsp;&nbsp;forwards to `===`.<br class="">&nbsp;/// - Note: Types that require domain-specific `==`<br class="">&nbsp;/// &nbsp;&nbsp;implementations with different semantics (e.g. floating<br class="">&nbsp;/// &nbsp;&nbsp;point) should define a more-specific overload of `==`,<br class="">&nbsp;/// &nbsp;&nbsp;which will be used in contexts where the static type is<br class="">&nbsp;/// &nbsp;&nbsp;known to the compiler.<br class="">&nbsp;/// - Note: Generic code should usually use `==` to compare<br class="">&nbsp;/// &nbsp;&nbsp;conforming instances; that will always dispatch to `===`<br class="">&nbsp;/// &nbsp;&nbsp;and will be unaffected by more specific overloads of<br class="">&nbsp;/// &nbsp;&nbsp;`==`.<br class="">&nbsp;protocol Identifiable { // née Equatable name is negotiable<br class="">&nbsp;&nbsp;&nbsp;func ===(_: Self, _: aSelf) -&gt; Bool<br class="">&nbsp;}<br class=""><br class="">&nbsp;/// Default definition of `==` for Identifiable types.<br class="">&nbsp;func ==&lt;T: Identifiable&gt;(lhs: T, rhs: T) -&gt; Bool {<br class="">&nbsp;&nbsp;&nbsp;return lhs === rhs<br class="">&nbsp;}<br class=""><br class="">&nbsp;/// Conforming types have a default total ordering.<br class="">&nbsp;///<br class="">&nbsp;/// If `a` and `b` are of type `Self`, `a &lt;=&gt; b` means that<br class="">&nbsp;/// `a` and `b` are interchangeable in most code.&nbsp; A conforming<br class="">&nbsp;/// type can document that specific observable characteristics<br class="">&nbsp;/// (such as the `capacity` of an `Array`) are inessential and<br class="">&nbsp;/// thus not to be considered as part of the interchangeability<br class="">&nbsp;/// guarantee.<br class="">&nbsp;///<br class="">&nbsp;/// - Requires: `&lt;=&gt;` induces a total ordering over<br class="">&nbsp;/// &nbsp;&nbsp;instances.<br class="">&nbsp;/// - Requires: the semantics of `&lt;=&gt;` are &nbsp;consistent with<br class="">&nbsp;/// &nbsp;&nbsp;those of `===`.&nbsp; That is, `(a &lt;=&gt; b) == .equivalent`<br class="">&nbsp;/// &nbsp;&nbsp;iff `a === b`.<br class=""><br class="">For floating point, I'd hope that `a === b` if `(a &lt;=&gt; b) == .same` *but not iff*. This is to satisfy IEEE 754: "Comparisons shall ignore the sign of zero (so +0 = −0)".<br class=""><br class="">&nbsp;/// - Note: conforming types will gain `&lt;`, `&lt;=`, `&gt;`, and `&gt;=`<br class="">&nbsp;/// &nbsp;&nbsp;operators defined in terms of `&lt;=&gt;`.<br class="">&nbsp;/// - Note: Types that require domain-specific `&lt;`, etc.<br class="">&nbsp;/// &nbsp;&nbsp;implementations with different semantics (e.g. floating<br class="">&nbsp;/// &nbsp;&nbsp;point) should define more-specific overloads of those<br class="">&nbsp;/// &nbsp;&nbsp;operators, which will be used in contexts where the<br class="">&nbsp;/// &nbsp;&nbsp;static type is known to the compiler.<br class="">&nbsp;/// - Note: Generic code can freely use `&lt;=&gt;` or the traditional<br class="">&nbsp;/// &nbsp;&nbsp;comparison operators to compare conforming instances;<br class="">&nbsp;/// &nbsp;&nbsp;the result will always be supplied by `&lt;=&gt;`<br class="">&nbsp;/// &nbsp;&nbsp;and will be unaffected by more specific overloads of<br class="">&nbsp;/// &nbsp;&nbsp;the other operators.<br class="">&nbsp;protocol Comparable : Identifiable {<br class="">&nbsp;&nbsp;&nbsp;func &lt;=&gt; (lhs: Self, rhs: Self) -&gt; Ordering<br class="">&nbsp;}<br class=""><br class="">&nbsp;/// Default implementations of `&lt;`, `&lt;=`, `&gt;`, and `&gt;=`.<br class="">&nbsp;extension Comparable {<br class="">&nbsp;&nbsp;&nbsp;static func &lt;(lhs: Self, rhs: Self) -&gt; Bool {<br class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return (lhs &lt;=&gt; rhs) == .ascending<br class="">&nbsp;&nbsp;&nbsp;}<br class="">&nbsp;&nbsp;&nbsp;static func &lt;=(lhs: Self, rhs: Self) -&gt; Bool {<br class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return (rhs &lt;=&gt; lhs) != .ascending<br class="">&nbsp;&nbsp;&nbsp;}<br class="">&nbsp;&nbsp;&nbsp;static func &gt;(lhs: Self, rhs: Self) -&gt; Bool {<br class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return (lhs &lt;=&gt; rhs) == .descending<br class="">&nbsp;&nbsp;&nbsp;}<br class="">&nbsp;&nbsp;&nbsp;static func &gt;=(lhs: Self, rhs: Self) -&gt; Bool {<br class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return (rhs &lt;=&gt; lhs) != .descending<br class="">&nbsp;&nbsp;&nbsp;}<br class="">&nbsp;}<br class=""><br class=""><blockquote type="cite" class="">I like this idea. If we keep === as a separate thing, now users have 3 “opportunities” to define<br class="">equality. The must be few, if any, use cases for this.<br class=""><br class="">Would love to see if anyone on the list can give us an example. Otherwise we should make<br class="">areSame === again™!<br class=""><br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">Daniel Duan<br class="">Sent from my iPhone<br class=""><br class=""><blockquote type="cite" class="">On Jul 21, 2016, at 6:32 PM, Robert Widmann via swift-evolution<br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;&gt;<br class="">wrote:<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Jul 21, 2016, at 6:19 PM, Xiaodi Wu<br class="">&lt;<a href="mailto:xiaodi.wu@gmail.com" target="_blank" class="">xiaodi.wu@gmail.com</a><br class="">&lt;<a href="mailto:xiaodi.wu@gmail.com" target="_blank" class="">mailto:xiaodi.wu@gmail.com</a>&gt;&gt;<br class="">wrote:<br class=""><br class="">This is nice. Is `areSame()` being proposed because static `==` is<br class="">the status quo and you're trying to make the point that `==` in the<br class="">future need not guarantee the same semantics?<br class=""></blockquote><br class="">Yep!&nbsp; Equivalence and equality are strictly very different things.<br class=""><br class=""><blockquote type="cite" class=""><br class="">Nit: I think the more common term in stdlib would be<br class="">`areEquivalent()`. Do you think `same` in that context (independent<br class="">of the word "ordering") might erroneously suggest identity?<br class=""></blockquote><br class="">There is room for improvement here.&nbsp; Keep ‘em coming.<br class=""><br class=""><blockquote type="cite" class=""><br class=""><br class=""><blockquote type="cite" class="">On Thu, Jul 21, 2016 at 8:11 PM, Robert Widmann via<br class="">swift-evolution<br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;&gt;<br class="">wrote:<br class="">Hello Swift Community,<br class=""><br class="">Harlan Haskins, Jaden Geller, and I have been working on a<br class="">proposal to clean up the semantics of ordering relations in the<br class="">standard library.&nbsp; We have a draft that you can get as a gist.<br class="">Any feedback you might have about this proposal helps - though<br class="">please keeps your comments on Swift-Evolution and not on the gist.<br class=""><br class="">Cheers,<br class=""><br class="">~Robert Widmann<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;<br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a>&gt;<br class=""><br class=""></blockquote><br class=""></blockquote><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;<br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a>&gt;<br class=""></blockquote>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;<br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a>&gt;<br class=""><br class=""></blockquote><br class="">--<br class="">Dave<br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;<br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;<br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;&gt;&gt;<br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a>&gt;<br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a>&gt;&gt;<br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a>&gt;<br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a>&gt;&gt;&gt;<br class=""></blockquote>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;<br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;&gt;<br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a>&gt;<br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a>&gt;&gt;<br class=""><br class=""></blockquote><br class="">--<br class="">Dave<br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;<br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;&gt;<br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a>&gt;<br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a>&gt;&gt;<br class=""></blockquote></blockquote><br class="">--<br class="">Dave<br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;<br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a>&gt;<br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">mailto:swift-evolution@swift.org</a>&gt;<br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">&lt;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a>&gt;<br class=""></blockquote>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""><br class=""></blockquote><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><span style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline" class="">--<span class="">&nbsp;</span></span><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><span style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline" class="">Dave</span><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><span style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline" class="">_______________________________________________</span><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><span style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline" class="">swift-evolution mailing list</span><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><a href="mailto:swift-evolution@swift.org" style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank" class="">swift-evolution@swift.org</a><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></div></blockquote></div><br class=""></div></div></div></div></div><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""><br class=""></blockquote></div><br class=""></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></div></blockquote></div></div></div></div></blockquote></div></div></div></div></blockquote></div></div></div><br class=""></div></blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></body></html>