Inside every large program, there is a small program trying to get out. - Tony Hoare
Today I learnt about:
- Protocols
- Protocols inheritance
- Extensions
- Protocols extensions
- Protocol-oriented programming (P.O.P)
The summary of the entire day was:
- Protocols describe what methods and properties a conforming type must have, but don’t provide the implementations of those methods.
- You can build protocols on top of other protocols, similar to classes.
- Extensions let you add methods and computed properties to specific types such as
Int
. - Protocol extensions let you add methods and computed properties to protocols.
- Protocol-oriented programming is the practice of designing your app architecture as a series of protocols, then using protocol extensions to provide default method implementations.
That's all for the Day 11 of 100DaysOfSwiftUI!