Home

Runtime behaviour

What happens once the compiler is done

The three chapters here are about the parts of Swift that cannot be settled while compiling: when memory is handed back, what happens when something goes wrong, and what is allowed to run at the same time as what.

They share a shape. In each case Swift takes a decision that most languages leave to convention and puts it in the type system instead — ownership into ARC, failure into throws, time into actors and Sendable. And in each case there is a way out underneath, for the times the model is wrong about your program: unowned, fatalError, nonisolated(unsafe). Knowing what the escape hatch skips is the whole reason to understand the model above it.