[swift-users] Comparing POP to OOP

Jon Hoffman hoffman.jon at gmail.com
Sun Mar 6 18:28:09 CST 2016


> On Mar 6, 2016, at 1:08 AM, Dave Abrahams via swift-users <swift-users at swift.org> wrote:
> 
> 
> on Sat Mar 05 2016, Jon Hoffman <swift-users-AT-swift.org> wrote:
> 
>>> On Feb 25, 2016, at 7:29 PM, Dave Abrahams via swift-users <swift-users at swift.org> wrote:
>>> 
>>> 
>>> on Sun Feb 14 2016, Jon Hoffman <swift-users-AT-swift.org> wrote:
>>> 
>> 
>>>> 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.  You can view the blog post here:
>>>> http://masteringswift.blogspot.com/2016/02/pop-and-oop.html
>>>> <http://masteringswift.blogspot.com/2016/02/pop-and-oop.html>
>>> 
>>> While I agree that simply translating classes into protocols misses the
>>> point, it seems as though your post still only deals with the
>>> dynamically-polymorphic half of the protocol world.  I don't see any
>>> generics in there at all, for example.  If you're really going for a
>>> comprehensive view of POP, you need to get into that stuff too.
>>> 
>>> -- 
>>> -Dave
>> 
>> You are correct that POP is about so much more than what was covered
>> in this introductory post.  This post was written to be an
>> introduction to be Protocol-Oriented programming with a comparison to
>> Object-Oriented programming.
>> 
>> POP was introduced to the World less than a year ago.  
> 
> Yes, I was there ;-)

Luckily you, I haven’t been to a WWDC however living on a lake I am able to sit by the lake and watch the video at my leisure.  Not really sure which one is better :)

> 
>> Over the next few years, as Swift changes and matures; the
>> Protocol-Oriented programming paradigm will mature with it.  Hopefully
>> I can continue to write about these changes as well.
> 
> I hope so.
> 
>> My book does cover POP and the technologies that make up POP more
>> extensively than this post does however I plan on writing several more
>> posts, as time allows with my day job, to expand not only on this post
>> but also on the material in my book.
> 
> I'm definitely interested to see more.
> 
> Thanks for your work on this,

Thanks, I am definitely getting a number of idea about future posts based on our conversation.  

> -- 
> -Dave
> 
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users



More information about the swift-users mailing list