Share this page

by Jon Hoffman     masteringswift.blogspot.com
Swift Version: 2.0

POP vs OOP Numerous tutorials that I have seen take a very Object-Oriented approach to the protocol-oriented programming (POP) paradigm. By this statement I mean that they tell us that with POP we should begin our design with the protocol rather than with the superclass as we did with OOP however the protocol design tends to mirror the superclass design of OOP. They also tell us that we should use extensions to add common functionality to types that conform to a protocol as we did with superclasses in OOP. While protocols and protocol extensions are arguably two of the most important concepts of POP these tutorials seem to be missing some other very important concepts. In this post I would like to compare Protocol-Oriented design to Object-Oriented design to highlight some of the conceptual differences.




© 2015 SoSoSwift. Blog · About · Contact · Privacy policy · Terms of service · RSS