Dynamic Casting in Swift

Samuel E. Giddins:

“We’ve been spoiled by Objective-C’s runtime flexibility…In Swift, however, we have a statically-typed language where the compiler really needs us to know types at compile-time, rather than runtime.”

Dynamic casting using the Swift operators as and as? can help “bridge the gap between static safety and the power of dynamicism.”