Fifty Shades of OOP

76 points by LesleyLai


josephjnk

I greatly prefer this to some of the other, more rabid takes on OOP which I've read recently. I like that you've covered some of the tradeoffs more thoroughly, and from the perspective of someone who clearly has deep familiarity with the concepts.

That said, I'm disappointed every time I read another discussion about the definition of and tradeoffs involved with OOP which does not mention the perspective of William Cook, who in my mind was one of the greatest authorities on the topic. In On Understanding Data Abstraction, Revisited he makes the case that encapsulation is the single most important aspect of object orientation, and that things like classes, inheritance, and mutability are orthogonal. He follows this up with the blog post A Proposal for Simplified, Modern Definitions of "Object" and "Object Oriented", where he makes this more explicit with a deeper discussion. A later paper by a different author, The power of interoperability: Why Objects are Inevitable makes the case that Cook's definition matches the implementation and explains the success of most large-scale software frameworks, regardless of language. The author's thesis is that whether in a primarily OO language like Java or in a very non-OO language like C, building large scale frameworks almost universally requires either using the language's built-in OOP features, or reinventing objects as a higher-level pattern.

I think a great deal of strife would be saved if more people were familiar with this work. I get indigestion every time I see a React developer claim the superiority of functional programming over OOP, as though the two are incompatible, and as though the framework that they've built their career on isn't an example of both.