4 ms·
OOP is a concept. How it gets implemented changes to concept. For example, some OOP systems using message passing, others do not. Some have single inheritance,
by spooneybarger 16y ago
OOP is a concept. How it gets implemented changes to concept. For example, some OOP systems using message passing, others do not. Some have single inheritance, some multiple, some use traits, some mixins. Some are class based, others like self are prototype based.
- loup-vaillant 16y agoThen, what is the common concept between all these implementations? What makes you decide that one piece of code is OO, while another is not? Is the line clear or fuzzy? Do most programmers more or less agree on this line? In other words, what do you mean when you say "OO"? I've read the c2.com wiki page Terry linked to. From what I saw, some programmers would say that C++ is OO¹ and Erlang is not, while others would say the exact opposite! This strongly suggest that the term has become mostly meaningless. Yet you seem to think that it hasn't. Hence my questions. [1] By "X is OO", I mean "X encourages OO programming"
- spooneybarger 16y agoIts fuzzy like when people discuss 'capitalism'. Note the semantic arguments that break out on HN when 'capitalism' is referenced. I don't think OO is a meaningless concept, I think arguing about what is and isn't OO in terms of implementation is. OO is a way of doing things. I can do OO in C. I've known people who hated C++ so much they did OO in C. Seriously. I know people who think that Java's polymorphism is so bastardize that you can't call Java an OO language. Still through all that, there are the some basic ideas that people agree on for what OO is. OO is not a good term to use if you want precision, it is a nice one if you want to quickly convey an idea where the specifics of an implementation aren't that important to the point at hand.
- loup-vaillant 16y agoI think I understand now. Sorry, but I'll have to be blunt. I promise I don't mean to insult you, but I feel that clarity is more important that politeness here. You recognize the existence of rather precise (though contradictory) definitions of OO. You probably have a preference for one of them. Yet, you have "chosen to believe" that there is a concept that most programmer agree to call "OO". Of course, you are unable to put such a concept in writing (or you would have done so by now). Therefore, you dismiss actual definitions of OO as "implementations", saying that the "concept" is above that. The advantage of such a line of thinking is that you don't actually disagree with anyone. The problem is that you hardly say anything when you utter "OO". I may be wrong. But if you want to convince me, you'll have to write a definition of this OO "concept" you're talking about. Or a sketch. Or at least tell me that it will take too much space and effort.
- terrywilcox 16y agoI rarely see programmers agree on anything. We're very argumentative. I've worked with people who insist their code is object oriented because it's written in Java, even though it's all classes full of static methods with no instance variables. I wouldn't call that object oriented, but they would. So yes, the term is becoming meaningless. The concepts are being ignored. That doesn't make them invalid, it just means we have more educating to do.