<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Mar 10, 2016 at 10:49 PM Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone,<br>
<br>
I just wanted to announce that we have sufficient change on the<br>
swift-3-indexing-model branch so that we can build the core standard<br>
library and StdlibUnittest. We achieved this by putting the protocol<br>
new structure into place, and stubbing out with fatalError() or just<br>
commenting out parts that didn't compile. Now we have a baseline that<br>
we won't regress, and we are starting to work towards improving it,<br>
making existing tests pass, and then writing new tests, and addressing<br>
TODOs and FIXMEs that we left in the code as we were doing the first<br>
pass.<br>
<br>
Here's the most recent pull request from Shawn where he starts to fix<br>
the tests: <a href="https://github.com/apple/swift/pull/1632" rel="noreferrer" target="_blank">https://github.com/apple/swift/pull/1632</a><br>
<br>
Now we are in the "massively-parallel" stage of this project and we,<br>
as always, welcome contributions to this branch!<br></blockquote><div><br></div><div>Is their a reason we are suppressing sort in place for MutableCollections?</div><div><br></div><div><span><div>benchmark/single-source/StaticArray.swift:86:17: error: 'sort()' has been renamed to 'sorted'</div><div> staticArray.sort()</div><div> ^~~~</div><div> sorted</div><div>Swift.MutableCollection:3:17: note: 'sort()' has been explicitly marked unavailable here</div><div> public func sort() -> [Self.Iterator.Element]</div><div> ^</div><div><br></div></span>In CollectionAlgorithms we have `sortInPlace` marked as unavailable renamed to `sort` and `sort -> [Iterator.Element]` marked as unavailable renamed `sorted`.</div><div><br></div><div>I believe we want `sort()` to be the mutating one (in place) and `sorted()` to return a sorted version, right? I poke around more on this. It could be we have an overzealous unavailable?</div><div><br></div><div><br></div><div>----------</div><div><span><div>extension MutableCollection</div><div> where</div><div> Self : RandomAccessCollection,</div><div> Self.Iterator.Element : Comparable {</div><div><br></div><div> @available(*, unavailable, renamed="sort")</div><div> public mutating func sortInPlace() {</div><div> fatalError("unavailable function can't be called")</div><div> }</div><div>}</div><div><br></div><div><span><div>extension MutableCollection where Self.Iterator.Element : Comparable {</div><div> @available(*, unavailable, renamed="sorted")</div><div> public func sort() -> [Iterator.Element] {</div><div> fatalError("unavailable function can't be called")</div><div> }</div><div><br></div><div> @available(*, unavailable, renamed="sorted(isOrderedBefore:)")</div><div> public func sort(</div><div> @noescape isOrderedBefore: (Iterator.Element, Iterator.Element) -> Bool</div><div> ) -> [Iterator.Element] {</div><div> fatalError("unavailable function can't be called")</div><div> }</div><div>}</div></span>-----------</div></span><br></div><div></div></div></div>