Group Group Group Group Group Group Group Group Group Forums

RWDevCon 2016 Session 303: Introduction to Protocol-Oriented Programming

Swift 2 protocols can do things impossible in Objective C, so much that Apple has even argued for “Protocol-Oriented Programming” as an alternative to object-oriented programming. What does this really mean and when is it wise?

This is a companion discussion topic for the original entry at

This was a great comparison! Thank you for sharing it as a sample of RWDevCon Vault. Now I’m going to be out $99. Unless I win a copy tomorrow. :wink:

1 Like

Very very well done!

1 Like

This is exactly the explanation of POP I have been looking for.

I found the question at 30:20 interesting: Should we ask for Abstract Classes in Swift?

I have been evangelizing OOP for 30 years and have been using Java for 20 years. Like many Java programmers, I’ve largely wandered away from inheritance toward Interfaces and Aggregation. And I impose strict rules when I do allow inheritance. (Like never use protected, only private and public and only methods can be public. That is, subclasses have no privileged access.) Because as a project grows large, and more importantly as it grows old, I regret inheritance decisions made early on, as this video suggests.

So Swift and POP feels like it is headed in the right direction for me. And Protocol Extensions are much better than Abstract Classes etc. I hope they don’t add Abstract Classes. Make us old people learn better systems. If you let people use Qwerty, we’ll be stuck with it forever.

BTW, I am facing the fact that my first love (SmallTalk-style OOP) is dead. Like the Film->Digital Photography transition, the rules of the game have changed and things that were important are no longer important and vice versa. Now being able to distribute computation across multiple threads and multiple cores and multiple cpus across the globe is more important than anything OOP solved. So unless someone figures out a way to make OOP work in the new world, functional programming or never-change-state is the future.