[swift-evolution] [Proposal] Make non-escaping closures the default

Ben Rimmington me at benrimmington.com
Mon Jun 6 10:33:22 CDT 2016


Trent Nadeau wrote:

> ### Imported C/Objective-C APIs
>
> Per the Core Team, most Cocoa closure/block parameters are escaping
> (e.g., delegates). As such the Clang importer will automatically add
> the `@escaping` annotation to closure/block parameters encountered in
> imported Objective-C APIs unless they are explicitly marked with the
> Clang `((noescape))` attribute. This will also be done with imported
> C APIs with function pointer or block parameters.

"SE-0012: Add @noescape to public library API" has a list of Foundation
and CoreFoundation APIs, but that proposal is still awaiting scheduling.

<https://github.com/apple/swift-evolution/blob/master/schedule.md>

-- Ben




More information about the swift-evolution mailing list