We can then typecast any instance that is returned from the
for loop as an instance that conforms to the
LandVehicle protocol and interact with it using the interface provided by the protocol.
- Swift as a protocol-oriented programming language
- from Swift 3 Protocol-Oriented Programming - Second Edition
- Publisher: Packt Publishing
- Released: November 2016
seems crap - vehicle is already known to be a LandVehicle, why can't we just use that directly without the cast?
Share this highlighthttp://www.safaribooksonline.com/a/swift-3-protocol-oriented/4796758/