<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><br><div>On Oct 13, 2017, at 9:59 AM, Xiaodi Wu via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div>On Fri, Oct 13, 2017 at 09:02 Adam Kemp &lt;<a href="mailto:adam.kemp@apple.com">adam.kemp@apple.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Right, but if you do look it up you get a bunch of things talking about sorting words.</div></blockquote><div dir="auto"><br></div><div dir="auto">And that’s a perfect description of the behavior. It’s a lexicographical comparison operation!</div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>How about pairwiseEqual?</div></div></blockquote><div dir="auto"><br></div><div dir="auto">A lexicographical comparison compares not merely pairwise, but in order from the first item onwards, and stops at the first unequal pair. Proceeding in order is key information, while stopping early on false is a nice-to-have. There’s already a word for this, and it’s “lexicographical.” And the analogy is universally understood: everyone has used a dictionary or index.</div></div></div></div></blockquote><div><br></div><div>I think the argument is that in this case, we're not performing an ordering, and we aren't looking at the elements using an ordered comparison. This stretches the understood use of "lexicographic", so while I think it's probably okay, it isn't a slam dunk. To me, the biggest benefit of lexicographicallyMatches is that it's obtuse, so most people will need to look at the docs to get what it actually does, which we can improve to call out the unexpected behavior with Set and Dictionary.</div><div><br></div><div>Nate</div><br><blockquote type="cite"><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div><br></div><div><div id="m_-1200901335570433091AppleMailSignature">--<div>Adam Kemp</div></div></div></div><div dir="auto"><div><div><br>On Oct 13, 2017, at 5:17 AM, Xiaodi Wu &lt;<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div><div dir="auto">“Lexicographical comparison” is a pretty standard term, and easy to Google. We didn’t make it up for Swift :)</div><div dir="auto"><br></div><div dir="auto">Since Swift names this protocol Sequence, something named “Sequence.sequenceEqual” cannot distinguish this method from ==.</div><div dir="auto"><br></div><br><div class="gmail_quote"><div>On Fri, Oct 13, 2017 at 01:28 Adam Kemp &lt;<a href="mailto:adam.kemp@apple.com" target="_blank">adam.kemp@apple.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><span style="background-color:rgba(255,255,255,0)">I agree that the proposed name is a poor choice.&nbsp;</span>If we just focus on the naming part, there is precedent in other languages for the name “sequenceEqual”. I think that name makes it a bit clearer that the result is whether the sequences match pair wise rather than whether they have the same elements irrespective of order. I don’t think it entirely solves the problem, but I like it a lot better than the proposed name.<br><br><div id="m_-1200901335570433091m_-1509611481453163169AppleMailSignature">--<div>Adam Kemp</div></div></div><div dir="auto"><div><br>On Oct 12, 2017, at 9:57 PM, Kevin Nattinger via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div>–∞</div><div><br></div>1. I strongly object to the proposed name. It doesn't make it more clear to me what the method does, and is misleading at best. Among other issues, "lexicographical" is defined as alphabet order, and (1) this method applies to objects that are not Strings, and (2) this method's behavior isn't any more well-defined for Strings, so that name is even more of a lie than the original.<div><br><div>2. This is really just a symptom of a bigger problem. The fact that two Sets can compare equal and yet return different results for that method (among too many others) is logically inconsistent and points to a much deeper issue with Set and Sequence. It is probably about 3 releases too late to get this straightened out properly, but I'll outline the real issue in case someone has an idea for fixing it.</div><div><br></div><div><b>The root of the problem&nbsp;is&nbsp;that&nbsp;Set conforms to Sequence, but Sequence doesn't require a well-defined order.</b> Since Set doesn't have a well-defined order, a significant portion of its&nbsp;interface&nbsp;is unspecified. The methods are implemented because they have to be, but they doesn't have well-defined or necessarily consistent results.<br><br>A sequence&nbsp;is, by definition,&nbsp;ordered. That&nbsp;is&nbsp;reflected&nbsp;in&nbsp;the fact that over half the methods&nbsp;in&nbsp;the main Sequence definition*&nbsp;make no sense and are not well-defined unless there&nbsp;is&nbsp;a&nbsp;well-defined order to the sequence itself. What does it even mean to `dropFirst()`&nbsp;in&nbsp;a&nbsp;Set? The fact that two objects that compare equal can give different results&nbsp;for&nbsp;a&nbsp;100%&nbsp;deterministic function is illogical, nonsensical, and dangerous.</div><div><br></div><div>*&nbsp;7/12&nbsp;by my count, ignoring `_*` funcs but&nbsp;including the `var`<br><br>The current contents of Sequence can be cleanly divided into two groups; those that&nbsp;return&nbsp;SubSequence imply a specific ordering, and the rest&nbsp;do&nbsp;not.</div><div><br></div><div>&nbsp;I think those&nbsp;should be/should&nbsp;have been two separate protocols:</div><div><br></div><div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(233,175,205);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures">public</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures">protocol</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">Iterable</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> {</span></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(52,188,38);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">&nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#cd7923">associatedtype</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> Iterator</span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">:</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures">IteratorProtocol</span></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(130,185,255);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">&nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">func</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">map</span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">&lt;</span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">T</span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">&gt;</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">(</span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">...</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">) </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">-&gt;</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">[</span><span style="font-variant-ligatures:no-common-ligatures;color:#34bc26">T</span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">]</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures">// Iterable where .Iterator.Element == T</span></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(130,185,255);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">&nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">func</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">filter</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">(</span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">...</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">) </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">-&gt;</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">[</span><span style="font-variant-ligatures:no-common-ligatures;color:#34bc26">Iterator.Element</span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">]</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures">// Iterable where .Iterator.Element == Self.Iterator.Element</span></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(52,187,200);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">&nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">func</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures">forEach</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">(</span><span style="font-variant-ligatures:no-common-ligatures">...</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">)</span></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(52,187,200);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">&nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">func</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures">makeIterator</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">() </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">-&gt;</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bc26">Iterator</span></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(52,187,200);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">&nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">var</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures">underestimatedCount</span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">:</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bc26">Int</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> { </span><span style="font-variant-ligatures:no-common-ligatures;color:#cd7923">get</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> }</span></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(214,214,214);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures">}</span></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(214,214,214);background-color:rgba(0,0,0,0.901961);min-height:14px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(130,185,255);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">public</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">protocol</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">Sequence</span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">:</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bc26">Iterable</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> { </span><span style="font-variant-ligatures:no-common-ligatures">// Maybe OrderedSequence just to make the well-defined-order requirement explicit</span></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(214,214,214);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures">&nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#cd7923">associatedtype</span><span style="font-variant-ligatures:no-common-ligatures"> SubSequence</span></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(130,185,255);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">&nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">func</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">dropFirst</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">(</span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">...</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">) &nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">-&gt;</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bc26">SubSequence</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> &nbsp; </span><span style="font-variant-ligatures:no-common-ligatures">// Sequence where .Iterator.Element == Self.Iterator.Element</span></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(214,214,214);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures">&nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">func</span><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">dropLast</span><span style="font-variant-ligatures:no-common-ligatures">(</span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">...</span><span style="font-variant-ligatures:no-common-ligatures">)&nbsp; &nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">-&gt;</span><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bc26">SubSequence</span><span style="font-variant-ligatures:no-common-ligatures"> &nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#82b9ff">//&nbsp; &nbsp; " "</span></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(214,214,214);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures">&nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">func</span><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">drop</span><span style="font-variant-ligatures:no-common-ligatures">(</span><span style="font-variant-ligatures:no-common-ligatures;color:#cd7923">while</span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">...</span><span style="font-variant-ligatures:no-common-ligatures">) &nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">-&gt;</span><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bc26">SubSequence</span><span style="font-variant-ligatures:no-common-ligatures"> &nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#82b9ff">//&nbsp; &nbsp; " "</span></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(214,214,214);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures">&nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">func</span><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">prefix</span><span style="font-variant-ligatures:no-common-ligatures">(</span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">...</span><span style="font-variant-ligatures:no-common-ligatures">)&nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">-&gt;</span><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bc26">SubSequence</span><span style="font-variant-ligatures:no-common-ligatures"> &nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#82b9ff">//&nbsp; &nbsp; " "</span></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(52,188,38);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">&nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">func</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">prefix</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">(</span><span style="font-variant-ligatures:no-common-ligatures;color:#cd7923">while</span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">...</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">) </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">-&gt;</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures">SubSequence</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> &nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#82b9ff">//&nbsp; &nbsp; " "</span></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(214,214,214);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures">&nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">func</span><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">suffix</span><span style="font-variant-ligatures:no-common-ligatures">(</span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">...</span><span style="font-variant-ligatures:no-common-ligatures">)&nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">-&gt;</span><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bc26">SubSequence</span><span style="font-variant-ligatures:no-common-ligatures"> &nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#82b9ff">//&nbsp; &nbsp; " "</span></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(130,185,255);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">&nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:#e9afcd">func</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6"> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bbc8">split</span><span style="font-variant-ligatures:no-common-ligatures;color:#d6d6d6">(</span><span style="color:rgb(52,187,200)">...</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(205,121,35)">where</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,187,200)">...</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(214,214,214)">)&nbsp; </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(233,175,205)">-&gt;</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(214,214,214)"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(233,175,205)">[</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,188,38)">SubSequence</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(233,175,205)">]</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(214,214,214)"> </span><span style="font-variant-ligatures:no-common-ligatures">// Iterable where .Iterator.Element == (Sequence where .Iterator.Element == Self.Iterator.Element)</span></div><div style="margin:0px;line-height:normal;font-family:'Andale Mono';color:rgb(214,214,214);background-color:rgba(0,0,0,0.901961)"><span style="font-variant-ligatures:no-common-ligatures">}</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures">(The comments, of course, would be more sensible types once the ideas can actually be expressed&nbsp;in&nbsp;Swift)<br><br>Then unordered collections (Set and Dictionary) would just conform to Iterable and not Sequence, so ALL the methods on those classes would make logical sense and have&nbsp;well-defined behavior; no change would be needed&nbsp;for&nbsp;ordered collections.<br><br>Now, the practical matter. If this were Swift&nbsp;1-&gt;2&nbsp;or&nbsp;2-&gt;3, I doubt there would be a significant issue with actually making this change. Unfortunately, we're well beyond&nbsp;that and making a change this deep&nbsp;is&nbsp;an&nbsp;enormous deal. So I see two ways forward.<br><br>1. We could go ahead and make this separation. Although it's a potentially large breaking change, I would argue that because the methods are ill-defined anyway, the&nbsp;breakage&nbsp;is&nbsp;justified&nbsp;and a net benefit.<br><br>2. We could&nbsp;try&nbsp;and think of a way to make the distinction between ordered and unordered&nbsp;"sequences"&nbsp;in&nbsp;a less-breaking manner. Unfortunately, I don't have a good&nbsp;suggestion&nbsp;for&nbsp;this, but&nbsp;if&nbsp;anyone has ideas, I'm all ears. Or eyes,&nbsp;as&nbsp;the&nbsp;case&nbsp;may be.<br><br></span></div><br></div><div><div><blockquote type="cite"><div>On Oct 12, 2017, at 4:24 PM, Xiaodi Wu via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br class="m_-1200901335570433091m_-1509611481453163169Apple-interchange-newline"><div><div><h1>Rename <code>Sequence.elementsEqual</code></h1>
<ul><li>Proposal: <a href="https://gist.github.com/xwu/NNNN-rename-elements-equal.md" target="_blank">SE-NNNN</a></li><li>Authors: <a href="https://github.com/xwu" target="_blank">Xiaodi Wu</a></li><li>Review Manager: TBD</li><li>Status: <strong>Awaiting review</strong></li></ul><h2><a href="https://gist.github.com/xwu/1f0ef4e18a7f321f22ca65a2f56772f6#introduction" class="m_-1200901335570433091m_-1509611481453163169gmail-anchor" id="m_-1200901335570433091m_-1509611481453163169gmail-user-content-introduction" target="_blank"></a>Introduction</h2><p>The current behavior of <code>Sequence.elementsEqual</code> is 
potentially confusing to users given its name. Having surveyed the 
alternative solutions to this problem, it is proposed that the method be
 renamed to <code>Sequence.lexicographicallyEquals</code>.</p><div>[...]</div></div></div></blockquote></div></div></div></div></blockquote></div><div dir="auto"><blockquote type="cite"><div><span>_______________________________________________</span></div></blockquote></div><div dir="auto"><blockquote type="cite"><div><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></div></blockquote></div></div>
</div></blockquote></div></div></blockquote></div></div>
</blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></body></html>