Swift and immortality: the @escaping Closures!

Last Updated: August 5, 2023By

What is an escaping closure and what does it have anything to do with immortality?

Well, I think the shortest and easiest explanation is that @escaping closures are closures that outlive the function that created them and are only used in concurrency situations or network calls.

At the moment they are effectively called, the function that created them is no longer active or alive (it returned way back ago and ended its existence – may that function rest in peace!).

You may say that @escaping closures ensure immortality; that’s why they must be treated with the utmost respect 😃

latest video

Latest Articles Via Inbox

iOS development, Swift, SwiftUI, programming and software engineering

Leave A Comment