[Pitch] Method capture lists (self / weak self / unowned self / none) for controlling implicit `self` in method bodies

I like putting it inside {} braces on the grounds that the syntax is similar to that of a closure. Unless closure list has to be part of function signature. Should it? If should - then one of the other two.

Could I use that in a protocol? What would be the rules IRT implementing a protocol method with mismatching capture list? (weak v non weak, vice versa, etc). Ditto question for subclassing with a misstating list.


As for implicit captures of self in Task initialisers (@_implicitSelfCapture) – I think this is a foot gun.

1 Like