Tag: protocols

  • Protocols

    The evolution of structs into class-like things that can hold properties and methods in Swift raised in my mind “what about inheritance?” – but no: structs in Swift can not use inheritance. Swift classes implement inheritance, but only from one class; there’s no multiple inheritance. Protocols neatly address both these concerns to a large extent,…