Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 968 Bytes

Day11.md

File metadata and controls

24 lines (16 loc) · 968 Bytes

Day 11 - HackingWithSwift - 100DaysOfSwiftUI Challenge

Inside every large program, there is a small program trying to get out. - Tony Hoare

Protocols and Extensions

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!