O'Reilly logo
  • Al Pearson thinks this is interesting:

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.


Cover of Swift 3 Protocol-Oriented Programming - Second Edition


seems crap - vehicle is already known to be a LandVehicle, why can't we just use that directly without the cast?