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.

By pure coincidence, on the way home (it’s the country – you have time to listen to most of a podcast on the drive home from town) I listened to Fireside Swift podcast episode 7 which was also about closures.

The to top it off, I sat down to lunch with this video which is part of iOS Academy‘s Swift for Beginners (2022) playlist.

One response to “Closures”

  1. Codewars / reduce – dev.endevour Avatar

    […] closure in the winning entry used all the closure redaction tricks I think I’ve complained about before. We could make it a bit more readable by putting syntax […]

    Like

Leave a comment