3 ms·
From the article: "You can completely implement data abstraction, encapsulation, messaging, modularity, polymorphism and (to a limited extent) inheritance witho
by rauljara 14y ago
From the article: "You can completely implement data abstraction, encapsulation, messaging, modularity, polymorphism and (to a limited extent) inheritance without using an object structure."
So the author agrees with you. So please, no "No, please."
- olalonde 14y agoYes but he wrote that to support his view that abstraction+polymorphism+encapsulation=OOP even when you are not using object structures: "The first sentence says that you must use object data structures to write OOP. That's blatantly wrong. You can completely implement data abstraction, encapsulation, messaging, modularity, polymorphism and (to a limited extent) inheritance without using an object structure." I don't much enjoy arguments about semantics but I personally feel his definition of OOP is way too broad to be useful. I am tempted to believe it was called tempted to believe it was called Object Oriented Programming for a reason.
- onli 14y agoSomeone downvoted you, so I think we should elaborate that further. I think you mean the right thing, but cited the sentence which only strangely says that OOP can be without objects (which alone doesn't mean that the focus on on "state transformations and encapsulated abstractions" is an OOP-thing). He wrote later on: >But if you're focusing on state transformations and encapsulated abstractions, you're writing OOP. So he is indeed saying that you can write OOP without objects, but also that the focus on "state transformations and encapsulated abstractions" is OOP. I think that this is a really strange way to think about OOP. edit: that was prior to an edit of the comment i respond to.
- olalonde 14y agoThanks. I edited my comment to try making it more clear. Another very important point that was mentioned here is that programming paradigms are not mutually exclusive. The author of this post seems to create a false dichotomy between procedural and OO programming.
- ircmaxell 14y agoThat wasn't my intention at all. I'm sorry if that's how it came across. It's just that I got tired of seeing people refer to code as procedural because it uses functions, and refer to code as OOP because it uses classes. I was just trying to point out that the approach is different from the tools that you use to implement the approach...
- shasta 14y agoI think it's true that you can encode OOP objects in any number of languages, but OOP really is about the objects. If your encoding isn't little bundles of methods, it's not OOP, even if it uses the other general techniques you've listed: abstraction, modularity, etc.