3 ms·
"Yet even with the amount of programs being written and problems about objects being solved, rather than converging on a complete representation of real-world o
by techiferous 16y ago
"Yet even with the amount of programs being written and problems about objects being solved, rather than converging on a complete representation of real-world objects, objects in programs seem to diverge, where an object from one project is different from an object from another project and is typically different from how a normal person thinks about the real world object."
The problem is not with object-oriented programming. It is a problem of our minds, of philosophy, of language.
An apple is an object. Our minds cannot know everything about an apple: the amount of information is too vast (the number and position of cells, different varieties, how to farm them, the quality of this particular apple, how it tastes to snakes, etc.).
So our minds create mental models of objects by assembling only a fraction of the information needed. The information that we use to construct our mental model is not random: it is goal-driven. I don't know much about apples except which ones I like and how to spot rotten ones. My mental models support my goal of eating tasty apples. If I were an apple farmer or even a cook then my mental model would need to be richer.
People will have many different mental models of a "real world object" depending on what their goals are with that object. So the problem of not converging on a "complete" representation of an object is not a limitation of object-oriented programming, it's an artifact of how our minds deal with the overwhelming vastness of the information around us.
- stralep 16y agoI agree. I have posted this because of comments. Good part of them agree with your statement. "One of the best leaps a programmer makes during their path from newb to godhood is to realize that 'objects' don't map well to real world objects. Programs work better, designs are more clean... code sucks less when a object in code represents the embodiment of a singular concept; a singular set of invariants rather than an object. Is that a failing of language design? A quirk of calling it object oriented programming rather than state oriented programming?" http://lambda-the-ultimate.org/node/3265#comment-48034 http://lambda-the-ultimate.org/node/3265#comment-48034 (worth reading, not particularly related with your statement)
- jimbokun 16y ago"It is a problem of our minds, of philosophy, of language." The first thing I thought of when he started asking why programming language objects are different from objects in the real world was: "Ceci n'est pas une pipe" http://en.wikipedia.org/wiki/The_Treachery_of_Images http://en.wikipedia.org/wiki/The_Treachery_of_Images A picture of a pipe is not a pipe. In the same way, an object in a programming language is not the same as the real world object that it represents (if there even is one). Of course we all know this, but it is also easy to get confused, if you're not careful.