[swift-evolution] Update the signature of ObjectiveC.autoreleasepool [SR-842]

Chris Lattner clattner at apple.com
Tue Mar 29 12:01:17 CDT 2016

> On Mar 29, 2016, at 9:57 AM, Jordan Rose <jordan_rose at apple.com> wrote:
>>> Is there a plan in place to deal with this?
>> There are several discussions, but none of them are in scope for Swift 3.  My recommendation is that you align with what we have in Swift 3, and if we do ever generalize the language and the rest of the stdlib, we can generalize autoreleasepool along with it.
> The weak link for me is the assertion that 'autoreleasepool' is more like 'forEach' than 'withCString' or 'withUnsafeMutablePointer'. We've seen some very nice simplifications by having those return values (usually replacing optional 'var' with a non-optional 'let').

I’m not arguing against “utility” here.  Perhaps the wedge is so strong for me, because @autoreleasepool *is* a statement in ObjC.


More information about the swift-evolution mailing list