noescape + Swift

In Swift 3, @noescape is the default value in closures and is therefore deprecated. However, you now have to think about when to make a function escaping. Really good explanation of what @noescape vs @escaping means:

"I’ve seen it explained many ways, but essentially it boils down to this: timing and scope.

As in, will the passed inclosure be called post function invocation? If the function returns but we call the closure at a later point in time in the execution flow — then it’s most certainly escaped that function .

Though conversely, if we only expect that function to do its thing within the function’s scope — then it’s not getting its grimy mittens on anything else. Thus, it’s a non-escaping closure."