and properties that are required to be provided by its implementation/s ▸can be adopted by classes, structs and enums ▸can be inherited, one or multiple ▸protocol extensions ▸generics with associated types
POP’ing we have plug-compatible objects (not tight to an implementation) ▸interfaces offer polymorphism independent of the inheritance hierarchy ▸reusability, maintainability, and extensibility
public class CLPlacemark : NSObject, NSCopying, NSSecureCoding { //... public var locality: String? { get } public var country: String? { get } //... }
need to switch our data source implementation all our repo tests should remain GREEN ▸we can extend AddressRepository (but we’d do it POP’d ) ▸we can reuse this code in other projects