3 ms·
> So this means that languages like Swift, for example, are not OOP? Swift claims to be protocol-oriented, actually. [0] is a video about it from Apple's WWDC
by DonaldPShimoda 8y ago
> So this means that languages like Swift, for example, are not OOP?
Swift claims to be protocol-oriented, actually. [0] is a video about it from Apple's WWDC in 2015.
[0] https://developer.apple.com/videos/play/wwdc2015/408/ https://developer.apple.com/videos/play/wwdc2015/408/
- mpweiher 8y agoThough that is a largely vacuous marketing claim, IMHO. https://blog.metaobject.com/2015/06/protocol-oriented-programming-is-object.html https://blog.metaobject.com/2015/06/protocol-oriented-progra...
- DonaldPShimoda 8y agoI don't think I agree with your claim here that it's a "largely vacuous marketing claim", but I do agree with most of what you wrote in that article. I agree with the article that POP is OOP in a very real sense. As the article puts it: "The simple fact is that actual Object Oriented Programming is Protocol Oriented Programming, where Protocol means a set of messages that an object understands." This I 100% agree with. But the fact of the matter is that many people do not consider the message-passing to be what defines OOP these days. I'm not saying these people are right, but rather that the common usage of the term does not align with the original use. When people teach OOP today, they teach it in terms of inheritance and methods and access modifiers. I don't think the word "message" even came up in this context once in my undergraduate studies. I think Swift's usage of the term "protocol-oriented programming" is to distinguish themselves from the modern concept of OOP. If they said "Swift is an OO language, but we try to avoid classes and inheritance where possible", the developers trained in programs like mine would lose their minds because to them the two are one and the same. So I don't think it's a "marketing claim" in the sense that I don't think they're using it to say "Ooh, look, we developed a whole new paradigm of programming!" Rather, I think they're trying to distinguish themselves from languages like Java (the current paragon of OOP it seems) which are 100% based on inheritance and encapsulation and couldn't care less for passing messages (explicitly).