Therefore, before we rush to say that other people don't understand OOP, perhaps we should consider the possibility that WE don't understand OOP if we insist on applying it where it doesn't apply.
Therefore, before we rush to say that other people don't understand OOP, perhaps we should consider the possibility that WE don't understand OOP if we insist on applying it where it doesn't apply.
Regardless, the ask was "Perhaps you could clarify what you were trying to say with respect to OOP?", not "Have you used (active record|ActiveRecord)?" Even if you somehow managed to not see the space, and didn't notice the capitalization, the response still doesn't logically follow.
Did you not read the comment?
I said that ActiveRecord was popularized by Ruby on Rails in 2004. I feel I was quite clear on this subject.
> Regardless, the ask was "Perhaps you could clarify what you were trying to say with respect to OOP?"
Sorry. I wrote my comment before you had revised yours. If you'd like to let me know when you're done with your revisions, I'm happy to wait.
Thanks for the random history lesson and all, but why are you bringing up ActiveRecord in the first place? The topic is OOP, not a library that is bundled with a web framework created many years ago.
Did you not even read your own comment? For a brief moment you seemed to recognize that the subject is about OOP.
Why? I enjoy and benefit from the fact that you think a software library and a theoretical concept are the same thing. Never change.
> I'm talking about OOP and not active record.
Yes. We established that in my very first comment. However, I stated that it reads like you were talking about active record, and that is why it was asked if you could clarify how it pertains to OOP, given that we know you are actually talking about OOP.
If you don't know how to clarify your message, why not just say so?
What it is about the OOP paradigm that you find does not fit this client->relational database application? The idea behind OOP is that you send a message out into the world, and maybe another actor can make something of it. You don't really know or care about the other actors are out there. If an actor hides a relational database behind closed doors, so be it. Not your problem. That's outside of the concern of OOP.
On the flip side, we have active record, which imagines a way to try and marry relational databases to an object-based (not oriented) model. Here you will regularly find criticism about "impedance mismatch" and where things like constraints should be handled. This still reads like what you are talking about, but has little to do with OOP.
Conceivably you could use that pattern to implement the local retention of an actor. Is that where you find applicability to OOP? OOP doesn't speak to the underlying actor implementation, though. It purposefully doesn't speak to the implementation as not having knowledge of actors is kind of OOP's whole deal. If you need to know things about other actors, you can't just throw a message out there.
Because of the similar names, those who don't understand OOP oftentimes confuse it with object-based programming. Perhaps this is what you are trying to speak to, using a 'database layer' as an example of object-based programming as seen in the wild?
Admittedly, I still don't fully understand the link you are making between relational databases and OOP.
It's not me who finds that OOP is a mismatch with relational systems. It's me and many other people. Ted Neward talked about this 20 years ago. Jeff Atwood talked about it 18 years ago. Martin Fowler defended OOP from this criticism but at least he also talked about it, 12 years ago. There's a Wikipedia page on the subject and many related articles over the years. This is well-trod ground.
Now. Does this mean we critics are right? No. It doesn't mean that. It means that this is well-trod ground. It is the topic of a healthy debate that generates one line of criticism of OOP. Functional programming--which I haven't mentioned in this thread until now--is another source of OOP criticism. What's interesting to me at this particular moment is not the substance of these debates ("is the object-relation impedance mismatch real? is mutable state really bad?") or who's right. What's interesting to me is that author of Sigma's Blog doesn't address any of this. I claim that these two topics--the ostensible object-relational impedance mismatch and the mutable state bugaboo of functional programming--are of such primary importance in generating criticism of OOP that any author who sets out to defend OOP from its critics must address these topics in order to be taken seriously. And yet, all this author says is
It seems like a lot of people dislike Object Oriented Programming
They don't say who these people are, what their reasons are for disliking OOP, or why things seem this way to the author. They just accuse unnamed "people" of not understanding OOP and then dive into a bog-standard description of OOP which is well-understood by all the relevant programmers that I know.
None of that answers your questions on the topic of the object-relational mismatch, of course, but then I never promised to explain that topic to you. I might, but then again I might not. If I don't, there are plenty of resources online that you can study for yourself. If you form a killer argument that addresses all issues once and for all, perhaps you should write your own blog post. Surely such a groundbreaking achievement would be worthy of making it all the way to the front page.
Great, but what is the mismatch you speak of?
> Ted Neward talked about this 20 years ago. Jeff Atwood talked about it 18 years ago.
Are you referring to the "The Vietnam of Computer Science"? It is about active record and object/relational mapping.
OOP, despite the poorly chosen name (which Kay regrets), isn't about objects at all. As is defined, OOP is about "messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things." But perhaps there is some other work by these people that I'm not familiar with that speaks to OOP?
> It seems like a lot of people dislike Object Oriented Programming
Sure. I expect all people dislike object-oriented programming in practice, which is why you never truly see it. Sending a message and maybe getting a response (i.e. extreme late-binding) is cool on a theoretical level, but not exactly practical when it comes to real applications that want to have certain guarantees. The rising love for statically typed languages highlights that people want such guarantees.
Ironically, OOP probably only shines for things like client->relational database systems that cannot guarantee the state of the database at compile time. At least the paradigm gets you thinking about what to do when an actor doesn't respond to your message.
Go do some independent study and then maybe we'll talk.
You keep pointing to the object-relational mismatch, which, while a thing, has no more to do with OOP than it does functional programming. It pertains to object-based programming. That is something else entirely.
Understandably, those who don't understand OOP often confuse OOP with object-based programming. Is that the problem here? Just that you don't understand OOP?
Fair that fluidity of language means that anyone can define OOP as they wish, and if they want to define OOP to be equivalent to OBP, good for them. They wouldn't be the first. And if we were discussing this topic in a vacuum we could set out a proclamation that defines OOP to be equal to OBP. However, OOP was already and explicitly defined by the article that setup the context for the following discussion, and the definition used is Kay's – the one that has nothing to do with objects. Other definitions for OOP would be clearly off-topic.
Perhaps it is that you are purposefully trying to go off-topic? Indeed, this thread started because someone (not me!) questioned exactly that.
If it is simply that you don't know how to clarify what you mean, why not just say so?
I don't have to. That's already explained in the standard literature on the topics of the object-relational mismatch and on functional critique of mutable state.
> You keep pointing to the object-relational mismatch, which, while a thing, has no more to do with OOP than it does functional programming. It pertains to object-based programming. That is something else entirely.
And I say that the object-relational mismatch does have more to do with OOP than it does with functional programming. If you want to make unfounded claims, two can play at that game.
> However, OOP was already and explicitly defined by the article that setup the context for the following discussion, and the definition used is Kay's
Point to the place on the doll where the article explicitly defines OOP and uses Kay's definition to do it.
> Perhaps it is that you are purposefully trying to go off-topic? Indeed, this thread started because someone (not me!) questioned exactly that.
And yet that person never came back. You can't rule out the possibility that this person was satisfied by my subsequent clarifications.
> If it is simply that you don't know how to clarify what you mean, why not just say so?
You first.
Understood. You have asserted that many times now. But what you are trying to say has not been made clear.
Let's break this down. As defined by context, OOP means: messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. Indeed, there exist other OOP definitions, but that is the one that was defined here.
I think we can rule out "local retention and protection and hiding of state-process" from the discussion. Hiding means that even if there is some kind of relational database access happening behind the curtain, we cannot know about it. If we don't know about it, we cannot talk about it.
That leaves messaging and extreme late-binding. It is not clear to me what it is about messaging and/or extreme late-binding that is at odds with relational databases. This is where I seek clarification.
While you pointed to the work of Neward and Atwood, all I could find from them was discussion about the pitfalls of trying to model relational databases as a particular object model. They say nothing about messaging or extreme late-binding. Unfortunately, they were of no help here.
Point to the place on the doll where the article author defines OOP.
Given that you don't know how to clarify your original message, perhaps we can still salvage something here? Let's assume that OOP is by another definition. Your choice. Define it however you please. Then explain how relational databases fit into that definition.
No, this has been covered exactly once. I asked 4 hours ago in this sub-thread this question, but you didn't answer it. I also asked again 3 hours ago in this sub-thread. I also asked a related question in another sub-thread 3 hours ago. You answered it one time 2 hours ago with "First thing you read. That's where definitions go." in the other sub-thread, then 1 hour ago in this sub-thread to its second query you said This has been covered several times which it absolutely not has been. THIS, dear readers, is what we call "bad faith."
> Given that you don't know how to clarify your original message, perhaps we can still salvage something here? Let's assume that OOP is by another definition. Your choice. Define it however you please. Then explain how relational databases fit into that definition.
Absolutely not. You have acted in bad faith, have been argumentative, have been snide, have been condescending, and have made things personal throughout these debates. I will absolutely not be corresponding with you in HN comments on this topic or on any other any longer. I would do so "in-person" in a Zoom call if you had the stones for it, but I doubt you do.
I count three times in this thread (plus apparently again in another thread, although that has no relevance to this one). I respect that I did not convey it in an understandable way. Communication is hard. But it is not clear to me what was interpreted instead, in order to allow me to turn the ship in the right direction.
> I will absolutely not be corresponding with you in HN comments on this topic or on any other any longer.
Because we wouldn't be able to figure that if you just stopped corresponding...?
> I would do so "in-person" in a Zoom call
Sure, I'll listen in if you want to expand upon how relational databases pertain to your definition of OOP. If you seek a debate, as suggested above, no thanks. High school debate club is best left for high school students. I did not engage in debate with you here for good reason, and I will not engage in debate elsewhere either.