[swift-users] Comparing POP to OOP

Evan Maloney emaloney at gilt.com
Wed Mar 9 16:18:22 CST 2016


Don't get me wrong -- I love protocol-oriented programming. I thought your "Crusty" WWDC talk was quite illuminating (and funny). But I still wish Swift had abstract classes! ;)



> On Mar 9, 2016, at 5:10 PM, Dave Abrahams <dabrahams at apple.com> wrote:
> 
> 
> on Wed Mar 09 2016, Evan Maloney <emaloney-AT-gilt.com> wrote:
> 
>> On Mar 5, 2016, at 5:15 PM, Jon Hoffman via swift-users <swift-users at swift.org> wrote:
>>> To be honest, I think that Apple may have done a disservice to POP
>>> by giving it the name “Protocol-Oriented Programming”.  With OOP and
>>> POP having such similar names, people tend to relate them together
>>> and in my opinion, how you design your application with POP is
>>> fundamentally different than with OOP.  Hopefully I will be able to
>>> write some additional posts about designing applications in a POP
>>> way using case studies.  Just a matter of finding time
>>> 
>> Interestingly, we just had a discussion about abstract classes on the
>> Swift Evolution mailing list, and many of the people who opposed the
>> idea of adding the feature cited the fact that Swift was a
>> protocol-oriented programming language rather than an object-oriented
>> programming language.
>> 
>> By that argument, because Swift is protocol-oriented, classes should
>> be treated like second-class citizens that shouldn't evolve new
>> features and don't deserve the same level of functionality provided by
>> just about every other object-oriented programming language (aside
>> from ObjC).
>> 
>> Calling Swift protocol-oriented seems to have led to a certain level
>> of dogmatism and reflexive opposition to anything seen as
>> object-oriented; it's protocols vs. classes.
>> 
>> Personally, what I love about Swift is that it doesn't fit into just
>> one "oriented programming" box. But perhaps I'm in the minority.
> 
> For every good idea, there's always some fraction of the community that
> will take it too far.  Swift is more protocol-oriented than
> object-oriented at its core, but Swift is a multiparadigm language.
> 
> -- 
> -Dave



More information about the swift-users mailing list