[swift-evolution] [Pitch] Improving capturing semantics of local functions
spestov at apple.com
Thu Nov 16 17:00:21 CST 2017
> On Nov 16, 2017, at 2:56 PM, Tino Heth via swift-evolution <swift-evolution at swift.org> wrote:
>> the stat suggests that in 90%+ real-life cases [weak self] is used so the "weak func" syntax sugar is worth to consider as an addition to this proposal.
> Slightly OT:
> Just thought about making all captures weak by default… I know it’s probably to late for such a change, but I wonder if this was considered when closures were designed
Remember that only references can be captured weakly, not value types, even if those value types contain reference members… so this might end up being more confusing than necessary.
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution