This book is about protocol-oriented programming. When Apple announced Swift 2 at the World Wide Developers Conference (WWDC) in 2015, they also declared that Swift was the world's first protocol-oriented programming language. From its name, we may assume that protocol-oriented programming is all about the protocol; however, this would be a wrong assumption to make. Protocol-oriented programming is about so much more than just the protocol; it is actually a new way of not only writing applications, but also how we think about programming.
In this chapter, we will cover the following topics:
- What protocol-oriented programming is
- How we can use protocol composition
- How we can use protocol inheritance
- How protocol-oriented programming compares to object-oriented programming
In Chapter 6, Object-Oriented Programming, we explored how we could design...