[swift-evolution] Pitch: @required attribute for closures

Charles Srstka cocoadev at charlessoft.com
Sun Jun 5 17:59:50 CDT 2016


> On Jun 5, 2016, at 5:46 PM, michael.peternell at gmx.at wrote:
> 
>> Am 05.06.2016 um 20:31 schrieb Charlie Monroe via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>>:
>> 
>> While I agree with Michael that nowadays, a lot of stuff that doesn't need to be, is done async, which leads to a giant thread pool per app and developers nowadays do not think of the cost of inter-thread communication (i.e. each dispatch_(a)sync has its cost, even though it's a light-weight thread), I agree with Charles that something like suggested does indeed help debugging issues with multi-thread apps.
>> 
> 
> I agree that it may help in a few cases. But I think the change is "not significant enough to warrant a change in Swift". It adds yet another keyword to the language that every new dev has to learn about, and the problem it solves can more elegantly be solved by writing more elegant code.

Okay, what’s the “more elegant” way to write a function that uses networking or XPC, or that requires user feedback from a sheet?

Charles

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160605/79389f4f/attachment.html>


More information about the swift-evolution mailing list