<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Dec 6, 2015 at 3:03 PM, Chris Lattner via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><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"><span class=""><br><div><blockquote type="cite"><div>On Dec 6, 2015, at 6:40 AM, Daniel Steinberg via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br><div><div style="word-wrap:break-word">I love that the team has released API Design Guidelines and find them very helpful. One piece of advice, however, seems to be at odds with current Standard Library practice.<div><br></div><div>Currently the methods sort() and sortInPlace() are the non-mutating and mutating versions of sorting a collection. Similarly, there are pairs of methods in Set named union() and unionInPlace(), intersect() and intersectInPlace() and so on.</div></div></div></blockquote><br></div></span><div>Hi Daniel,</div><div><br></div><div>This is a known issue, and it is because we want to keep Swift 2.2 reasonable source compatible with Swift 2.  The changes to the standard library will land after Swift 2.2 branches for its release in the spring.  </div><div><br></div><div>If you’re interested in more details on this effort, check out this blog post:</div><div><a href="https://swift.org/blog/swift-3-api-design/" target="_blank">https://swift.org/blog/swift-3-api-design/</a></div><div><br></div><div>It includes a link to the diff-in-progress for the standard library.</div><div></div></div></blockquote></div><div class="gmail_extra"><br></div>Hi Chris,</div><div class="gmail_extra"><br></div><div class="gmail_extra">I think Daniel is not highlighting the inconsistency, but saying that he likes ~InPlace better:</div><div class="gmail_extra"><br></div><div class="gmail_extra">On Dec 6, 2015, at 6:40 AM, Daniel Steinberg via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><div class="gmail_extra">&gt; <span style="font-size:12.8px">Previously the sort methods were named sort() and sorted(). I never could remember which is which.</span></div><div class="gmail_extra"><span style="font-size:12.8px"><br></span></div><div class="gmail_extra"><span style="font-size:12.8px">Dmitri<br></span><br clear="all"><div><br></div>-- <br><div class="gmail_signature">main(i,j){for(i=2;;i++){for(j=2;j&lt;i;j++){if(!(i%j)){j=0;break;}}if<br>(j){printf(&quot;%d\n&quot;,i);}}} /*Dmitri Gribenko &lt;<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>&gt;*/</div>
</div></div>