[swift-evolution] Marking sort and sorted with rethrows

Chris Lattner clattner at apple.com
Tue Jun 7 22:34:53 CDT 2016


> On Jun 7, 2016, at 12:07 PM, Tim Vermeulen via swift-evolution <swift-evolution at swift.org> wrote:
> 
>> True, but the cost of being able to restore the original ordering, when
>> that restoration may not be needed at all, is prohibitive.
> 
> What about simply restoring the elements, in no particular order? This seems like an easy enough task, and I don’t think it requires the sorting algorithm to allocate any extra memory (in case no error is thrown, at least).

What is the example that motivates this?  Is there a widely used comparison function that throws?

-Chris


More information about the swift-evolution mailing list