"Object-oriented programming" in its basic form means that the data manipulated in a computer program is self-describing. We can ask a datum, "what are you? what type?". The functions of that program are organized around data. This is in contrast with the form of programming in which data is just some storage, which is given a meaning by the algorithm that operates on it; it is not self-describing.<p>Self-describing data lets us then have generic operations. For instance, if an object hold a sequence of other object, we can create an operation which extracts the N-th one. And we can make that same operation work for an object which is a character string, vector, list. This is because the function can inquire the object what it is, and then call the appropriate concrete implementation which does the right thing for that type.<p>This leads us to realize that type is connected to the operations which are applicable. Those objects are somehow of the same "kind". This gives rise to the concept of subtyping and substitutability: a string is a kind of sequence and so is a list and we can have operations on sequences.<p>The non-object-oriented concepts are all that cruft from various languages which tries to strangle OO: virtual base classes, protected members, methods within class scope, scope resolution, copy constructors, yadda yadda ad nauseum ...
We are led to believe that OO requires this or requires that. It's not OO if there is no encapsulation. It's not OO if there is no language-enforced "information hiding". It's not OO if there is no private/public access mechanism. It's not OO if method calls aren't represented as message passing. It's not OO if methods aren't in a compile-time class scope together with data members. ...
The term "object-oriented" was coined by Alan Kay, and he did provide a much more precise meaning. Unfortunately, the term became a fad and was then diluted into all sorts of vaguely related ideas.<p><a href="http://c2.com/cgi/wiki?AlanKaysDefinitionOfObjectOriented" rel="nofollow">http://c2.com/cgi/wiki?AlanKaysDefinitionOfObjectOriented</a><p>I find the original idea deep and worth thinking about.
"Valid concepts are arrived at by induction."<p>If the point is to argue that OOP is not a valid concept, the author should show first that 'programming' is a valid concept (using the same definitions) and that there are some related concepts (e.g., 'functional programming') that are valid, because if the same argument can be applied to most or all other '* programming' concepts too (not to mention concepts like 'validity' and 'concept'), then the point is not specific to OOP at all.<p>Incidentally, <a href="http://en.wikipedia.org/wiki/Prototype_theory" rel="nofollow">http://en.wikipedia.org/wiki/Prototype_theory</a> seems a much better starting point for thinking about concepts in general, and '* programming' in particular.
Well, the author recommends induction as a means of figuring this out, and it seems for induction to work we need to have some existing example to induce the principle from (if I am remembering my maths, I might not be). So to figure out our concept it may be worth taking a look at what the use of object-oriented features is, and use that as a starting point. Maybe, again I am a little rusty on my inductive reasoning.<p>I think one thing that strikes me with Object-oriented programming in general is the idea of data management and function management.<p>I guess if we look at the features that are associated with object-orientation (I am not pretending that I am being strictly inductive at this point, although I think this is vaguely inductive), I would say that it takes the management and organization of programming concepts, such as data and function organization, and embeds it into the language itself.
The mainstream programming language community has a pretty strong consensus on what OOP means, in terms of language features.<p>Some people out there seem to have some confused notions of what OOP is. That doesn't mean there isn't a well-understood and more-or-less accepted definition, at least in academia.<p>Edit for downvotes: dynamic dispatch + associating methods with classes, often times but not necessarily accompanied by an inheritance hierarchy. Of course there's lot of room for design decisions (and prototype-based languages are only awkwardly encapsulated in that group), but these features are basically unique to OOP languages.<p>The point is that you could put a language with these features in front of any random sample of PL researchers and they would probably more-or-less agree on whether the language has OO features. That's more or less the definition of scientific consensus.
There is such a thing as object-oriented programming; the author just hasn't encountered it through the tools that he was led to believe were OO programming tools.<p>"I didn't find Tao in Java or GoF" does not imply "there is no Tao".
Alan Kay coined the term "object-oriented" for software architecture in the late '60’s. He offers a good explanation of it: <a href="http://programmers.stackexchange.com/a/58732" rel="nofollow">http://programmers.stackexchange.com/a/58732</a><p>“OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things.” — Alan Kay<p>It's easy to assume only languages with Class and Object abstractions are "object-oriented", but the "orientation" is really more about your mental model of the system as differentiated objects that communicate via messages.
Url changed from <a href="http://runarorama.github.com/blog/2008/12/04/no-such-thing/" rel="nofollow">http://runarorama.github.com/blog/2008/12/04/no-such-thing/</a>, which redirects to this.
Programming in C which isn't "object oriented" is very similar to say, Java. You make the same architectural diagrams on a whiteboard for both. So I agree with the author.