[swift-evolution] @noescape loop hole
Robert Ryan
robert.ryan at mindspring.com
Fri Oct 21 17:18:55 CDT 2016
I’ll defer the question of whether it’s worth the effort or not to fix this. But even if we decide to make parameter closures non-escaping by default, but leave other closures escaping, there is still a problem here: If you mark a non-parameter closure as `@noescape`, you get a warning that incorrectly says "@noescape is the default and is deprecated”, even though it really is escaping by default in this context. If we’re not going to change all closures to be non-escaping by default in that context, we should fix the warnings. And I guess we should also confirm whether it really is truly deprecated or not (because `@noescape` appears to still work for these non-parameter closures).
> On Fri Aug 26 19:52:40 CDT 2016, Jordan Rose via swift-evolution <swift-evolution at swift.org> wrote:
>
> That’s not really a loophole, because nothing unsafe can happen because of it. It’s just a missing feature. Personally I think the added complexity from allowing non-parameter closures to be marked non-escaping makes it not worth the effort.
>
> Jordan
More information about the swift-evolution
mailing list