[swift-evolution] $self

Chris Lattner clattner at apple.com
Wed Sep 28 18:31:21 CDT 2016

> On Sep 28, 2016, at 4:05 PM, Paul Jack via swift-evolution <swift-evolution at swift.org> wrote:
> So previously there were a few threads on the "strong self/weak self
> dance" but they didn't seem to get anywhere. For instance:
> https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160201/008713.html
> https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160215/010759.html
> https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160208/009972.html
> ...and possibly others.
> I'd like to propose something even easier (and more specific) than all
> of the above discussions. Specifically, I'd like to introduce a new
> automagic closure variable, $self, whose presence in a closure would
> cause that closure to weakly capture self in a safe manner.

This is an additive proposal, so we’d prefer for you to hold off until we get the core work for Swift 4 stage 1 under control.  We need to focus on making sure ABI and Source Stability takes priority.


More information about the swift-evolution mailing list