• 52weeks-episode7-swift-closures

  • Mar 5 2022
  • Length: 20 mins
  • Podcast

52weeks-episode7-swift-closures

  • Summary

  • Okay, so I'm live here with 52 weeks of Swift, Episode Seven closures, going to talk about how they work with Swift. And let's go ahead and get started, I'm going to share my screen. Let's go ahead and get this thing going here. So to start with, in Swift here, we can see that closures are self contained blocks of functionality that get passed around. And so in the world of distributed computing, which is really the world we live in with cloud computing, it's really a great strategy to have some kind of closure in your codebase. Because really, you can just pass a piece of code around, it's got everything it needs to do, its work, and then it does its work. And then it returns back result or just goes away because it's done working. So here, we can see here that you can see that there's global and nested functions. So typically, that's how the closure works, right is that you have a function with outer scope. And as an inner function, it retains that state, and then it goes through and it does its work.

    Show More Show Less

What listeners say about 52weeks-episode7-swift-closures

Average Customer Ratings

Reviews - Please select the tabs below to change the source of reviews.

In the spirit of reconciliation, Audible acknowledges the Traditional Custodians of country throughout Australia and their connections to land, sea and community. We pay our respect to their elders past and present and extend that respect to all Aboriginal and Torres Strait Islander peoples today.