[swift-evolution] Pitch: @autoreleasepool attribute for loops

Thorsten Seitz tseitz42 at icloud.com
Mon Jan 11 11:13:38 CST 2016


> Am 09.01.2016 um 19:47 schrieb Chris Lattner via swift-evolution <swift-evolution at swift.org>:
> 
>> On Jan 8, 2016, at 10:00 PM, Jacob Bandes-Storch via swift-evolution <swift-evolution at swift.org> wrote:
>> 
>> I sympathize with the problem statement, but I wonder if we should instead be considering ways of allowing control-flow statements (break, continue, return) to work from inside @noescape closures.
> 
> Agreed, this seems like the right path forward.

+1
This would be helpful in several other cases that have come up on this list, e.g. it would allow creating new control statements with trailing closures which could offer expected behavior, e.g. a timesRepeat method instead of adding new looping syntax for that as discussed in another thread.
Furthermore it might allow "return" to be used for non-local return.

-Thorsten 


More information about the swift-evolution mailing list