When a function is known at compile time; the compiler can inline the function (replace the function with the code that it would execute) or discard/simplify code that wouldn't actually run at compile time, for optimization.
- variables in Existential Container
- methods added via extension
Back
Dynamically Dispatched
Front
The compiler doesn't necessarily know, during compilation, if the function will run. Rather, during runtime, the system will consult a dispatch table ('witness table' in Swift) for the specific method implementation at runtime.
Back
Existential Container
Front
Variables declared without type but conforming to a protocol are placed in the Existential Container; it represents protocol-typed values.