I am copy/pasting my comment from this article sumarizing a post on reddit:

I really don't think "Protocol Orientation" is something new... You've got protocols in Obj-C, you've got Interfaces in Java, Abstract Classes in C++, etc.

You can segregate interfaces and avoid inheritance by replacing it with composition in any OO language...

Please help me understand what makes Protocol Orientation different or new. It seems to be more of a buzz-word coined by Apple to maybe push developers into being aware and respecting SOLID principles in their apps... By no means a bad thing, but also not something new.

What is Protocol Oriented Programming?

Is it a new programming paradigm that has the potential to be as revolutionary as structured programming and abolish the dangerous "goto" of OOP?

Or just a way of enforcing good, solid respecting design into OOP code bases?

And since nothing is ever a silver bullet, what are the pitfalls of POP?

  • 2
    What is "The dangerous 'goto' of OOP?" If you're speaking rhetorically, I think that functional programming has a better chance of replacing that. Aug 12, 2016 at 16:33
  • Sounds like design-by-contract to me. Aug 12, 2016 at 16:34
  • @RobertHarvey By that I mean whatever (anti)patterns you can abuse while doing OOP Aug 12, 2016 at 16:35
  • 3
    Most so-called "software patterns" are really just workarounds for weaknesses in the programming language, especially OOP patterns. Aug 12, 2016 at 16:37

4 Answers 4


Apple Inc. calls interfaces "protocols." When they say "protocol oriented" they mean programming using interfaces instead of inheritance.

From here: http://www.tutorialspoint.com/objective_c/objective_c_protocols.htm

Objective-C allows you to define protocols, which declare the methods expected to be used for a particular situation. Protocols are implemented in the classes conforming to the protocol.

From Objective-C Succintly:

In Objective-C, a protocol is a group of methods that can be implemented by any class. Protocols are essentially the same as interfaces in C#, and they both have similar goals. They can be used as a pseudo-data type, which is useful for making sure that a dynamically-typed object can respond to a certain set of messages. And, because any class can “adopt” a protocol, they can be used to represent a shared API between completely unrelated classes.

From Objective-C for Absolute Beginners:

Apple defines a protocol simply as a list of methods declarations, unattached to a class definition. The methods listed for protocols are suppose to be implemented by you.

So, protocol oriented programming is what Objective-C and Swift programmers call what the rest of us call favoring implementing interfaces over extending classes (inheritance).

Is it a new programming paradigm that has the potential to be as revolutionary as structured programming and abolish the dangerous "goto" of OOP?

No. It's nothing new, just a different name used in the Apple developer community. Composition over inheritance has tremendous advantages though that have been discussed extensively in this forum.

And since nothing is ever a silver bullet, what are the pitfalls of POP?

At first none came to my mind, but I just found this in a forum in CodeRanch, postes by user Jim Yingst:

One disadvantage of interfaces is that one you publish them to other coders outside your own control, they represent a public commitment which can be difficult to change later. You don't know who else is using the interface and you don't know how, so you can't just add a new method to the interface without risking breaking the code of existing clients (if/when they upgrade). In comparison, if you'd used an abstract or concrete class, you could just add a new concrete method with no problems (usually).

It's possible to work around this by creating a new interface with extends or supplements the original one, and changing your concrete implementations to implement the new interface, instead of or in addition to the old one. That way you don't break existing client code. It's generally more work than adding a method to a class would be, but it's possible.

This disadvantage isn't a reason to abandon interfaces, but it is a reason to design your interfaces carefully, and think carefully before you publish a new interface in a new release. Spending some extra time designing things well now can save you many headaches later.

  • 1
    That's the same impression I got from reading about it. The OP does also ask for pitfalls of interfaces, do you think you could add a couple or link to a different question about it for good measure?
    – Ordous
    Aug 12, 2016 at 17:08
  • 2
    This is exactly the right answer. I, as an Apple-systems dev, have no trouble finding lots of existing information about "protocol-oriented programming". I just mentally translate interface IDingbat to protocol Dingbat.
    – jscs
    Aug 12, 2016 at 18:20
  • 1
    They had to invent new terminology, otherwise it would be too much like C#.
    – Den
    Aug 16, 2016 at 8:12
  • 1
    @Den That reminds me of how people complained in 1936 about lambda calculus for being insufficiently C-like and in 1970 about Pascal's syntax for also being insufficiently C-like, despite C not being invented until 1972. (NeXT, not Apple, added protocols to Objective-C and NeXT ceased to exist two years before Microsoft started forming the C# team.)
    – 8bittree
    Sep 6, 2016 at 16:28
  • 1
    As you can read in Daniel T.'s answer, Swift allows developers to extend Protocols and give methods a standard implementation or add new, implemented methods. In Swift, Protocols are a mix between classes with abstract and/or virtual methods and interfaces.
    – Mark
    Aug 31, 2017 at 10:04

On big difference between a Swift/Objective-C protocol and a Java-like interface is that the methods in the former can have default implementations. That's not something you can do with a Java Interface. It's almost like having C++ abstract classes and multiple inheritance.

Is POP new? As mentioned already, Objective-C has protocols too, so calling it a "new thing" is a little bit of a stretch. However, what is new to Swift is the ability to implement these protocols using value types rather than reference types and thats the big deal that was featured in Apple's presentation where POP was introduced.

  • 4
    Actually Java has default methods in interfaces since v8 and C# is getting it as well.
    – qbd
    Oct 8, 2018 at 8:18
  • I think you missed one important feature, which substantially alters the kind of write with Swift protocols vs. Java's interfaces: Swift lets you extend arbitrary types (even if they're not your own) with conformances to protocols. This makes protocols into the key you need to "buy in" to accessing a particular algorithm. For example, if you extend a type with a conformance to Sequence, it gets map, filter, reduce, etc. "for free".
    – Alexander
    Oct 1, 2020 at 14:51
  • (preface: I like C#, and Swift was heavily influenced by C#) It was really funny for watch these 2 guys talk about future directions of extension methods in C#, which are exactly precisely the kinds of extension features that already so heavily drive the design of software in Swift. See 34:00 of A Preview of C# 8 with Mads Torgersen 39:40: "This is absolutely crazy, and I don't think we'll get to it for C# 8, but you can imagine in the long run is to actually have extension interface implementations"
    – Alexander
    Oct 1, 2020 at 14:59

I did not know the term, being from the Microsoft world. But having read Tulains's excellent answer I can cover the pitfalls part.

It is not like POP (interfaces) are better than OOP (inheritance), they both have their purposes and strengths. An interface is looser and more flexible. Inheritence ties you to the trunc of a particular class tree but it offers you free implementations of the basics, structure and guidance. If inheritance is done well, it is hard for the subclassing programmer to screw things up.

But the most important reason for the rise of POP is probably the relatively new, distributed, networked world with many developers, that do not know each other, potentially working on the same project. It fits the model of a developing community and it can cross process and/or programming language bounderies (SOA). Inheritance is meaningful only within a single project compiled by the same compiler. Which does not invalidate it, it just has a different domain.


If you don't care for OOP and think it's all about inheritance and runtime polymorphism, it may sound reasonable to coin a new term for using protocols for the same purpose.

In my opinion, it is not a useful name and just confuses people about OOP, suggesting that its core tenets are inheritance and runtime polymorphism, as did every beginners' introduction in a C++ book in the early 1990s.

My suggestion is therefore to avoid the term entirely.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.