Изменения в новых версиях / Swift 5.7

class WeakSelfCapturesNSObject {
    var count = 10

    func example() {
        let showCount = { [weak selfin
            guard let self else { return }
            print("count is \(count)")
        }

        showCount()
    }


SE-0365 takes another step towards letting us remove self from closures by allowing an implicit self in places where a weak self capture has been unwrapped.