Closures


Jul. 25, 2022

Closures

I had one of those synchronicity in learning moments this morning. I am reading The Swift Book - ie The Swift Programming Language, Swift 5.7 as part of my cs193p homework, and this morning, in a coffee shop was admiring what a clear, well written explanation was given for closures . It is super well written, stepping the reader through in logical (and digestible) steps.

If you’ve never carelessly passed around a pointer to a function and caused the Blue Screen of Death, or done much multi-threaded programming, the use-case for closures, and use of them is going to be challenging at first. Then Swift’s ability to cut the syntax down to very little will be challenging.