Type Safely

Type Safely

Use Implicit Self After Unwrapping [weak self]

Daily Coding Tip 276

Type Safely's avatar
Type Safely
Apr 07, 2023
∙ Paid
toddler looking at believe in yourself graffiti
Photo by Katrina Wright on Unsplash

Here’s another new Swift 5.8 feature.

In previous versions of the language, it was still necessary to make capture semantics specific after unwrapping [weak self]. In other words, [weak self] returns an optional version of self that you can unwrap into a non-optional version.

When self is no longer optional, it would ma…

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