[swift-evolution] Proposal: Closures capture weak by default

Kevin Ballard kevin at sb.org
Tue Dec 8 17:15:48 CST 2015


On Tue, Dec 8, 2015, at 02:57 PM, Andrew Bennett wrote:
> Kevin, I think you should definitely propose that (weak in outer and
> inner closure), it's one of the surprises that led me to this
> proposal. I also really like your suggesting of requiring explicit
> weak/strong on self, I think this could solve many cases.

I submitted the proposal as
https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001134.html
(unfortunately it looks like the plain text version got garbled :/).

Regarding explicit weak/strong, my feeling is it would probably get too
annoying to have to type `[self] in` everywhere. But it may be worth
playing with.

-Kevin Ballard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151208/1111dba7/attachment.html>


More information about the swift-evolution mailing list