Protocol Oriented Programming in Swift: Is it better than Object Oriented Programming?

We’re going to talk in-depth about protocol-oriented programming (POP) using Swift 4 in this article. This post is the second and final article in a two part series. If you haven’t read the introductory article, please do so before continuing onwards. Today, we’ll discuss why Swift is considered a “protocol-oriented” language, compare POP and object-oriented programming (OOP), compare value semantics and reference semantics, consider local reasoning, implement delegation with protocols, use protocols as types, use protocol polymorphism, review my real-world POP Swift code, and finally, discuss why I’ve not bought 100% into POP. Why is Swift “protocol-oriented?” Remember that in … Continue reading Protocol Oriented Programming in Swift: Is it better than Object Oriented Programming?