@attheodo
Enter Protocols
● A protocol defines a blueprint of methods, properties and
other requirements that suit a particular task/functionality
● It can be adopted by a class, structure or enumeration to
implement the requirements.
● A protocol can be extended to provide default
implementation to some of the requirements that
conforming types can take advantage of.
● Protocols are Types; Can be parameter types or return types,
can be used as a type for parameters/constants, can be
types in collections etc.
● Protocols can inherit one or more other protocols