SE-0269: Increase availability of implicit self in @escaping closures when reference cycles are unlikely to occur

Proposal Accepted

This proposal has been accepted. The proposal discussion roughly divided into two parts:

  1. Discussion around hoisting the explicit mention of self into the closure capture list as the alternative to repeatedly writing explicit self in a closure body (and having the compiler fix-it encourage that style)

  2. The expansion of implicit self around the specific case where the type of self is a value type

The discussion on both topics was deeply constructive and productive. The core team wants to express their deep thanks to everyone who contributed to this discussion. Some really fantastic insights were made from different perspectives.

In the end, the core team felt that the hoisting self in the closure capture list provided a better experience where explicit self will still be encouraged as it (a) more clearly captures the intent of explicitly mentioning self and (b) syntactically will be cleaner in the cases where self is uttered multiple times.

The discussion around the expansion of implicit self was a bit more fragmented on the review, but ultimately the core team sided with expanding the use of implicit self as proposed in SE-0269.

Thank you to everyone who participated in this review!

14 Likes