Type Safely

Type Safely

Using [unowned self] In a Closure To Reference Self Safely

Daily Coding Tip 280

Type Safely's avatar
Type Safely
Apr 12, 2023
∙ Paid
person holding DSLR camera
Photo by James Bold on Unsplash

When I explored the use of implicit self after unwrapping [weak self] in Daily Coding Tip 276, it was an example of a new Swift 5.8 feature. That feature made it possible to reference functions and properties inside a closure, but only after optional binding occurs.

With [unowned self], the reference to self is not optional…

User's avatar

Continue reading this post for free, courtesy of Type Safely.

Or purchase a paid subscription.
© 2026 Type Safely · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture