> On Jun 8, 2016, at 7:21 PM, Chris Lattner via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> 
>>> On Jun 8, 2016, at 7:52 AM, Brent Royal-Gordon <br...@architechies.com> 
>>> wrote:
>>> 
>>> Is there a widely used comparison function that throws?
>> 
>> Any comparison function that examines external data related to the instance:
>> 
>> * Sorting filenames by the data in the corresponding files
>> * Instances backed by a database where actually loading the data could fail
>> * Etc.
> 
> Ok, instead of using rethrows, would it be a better overall design be to 
> define two overloads, one that takes a throwing closure and one that doesn’t? 
>  This allows the throw-supporting implementation to be slower without 
> punishing the normal case..
> 

Smilar solution to what java did.


> -Chris
> _______________________________________________
> swift-evolution mailing list
> swift-evolution@swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to