Name: Anonymous 2010-10-22 13:26
What you call OOP is not object-oriented, it's subject oriented.
You're programming subjects that do actions and interact with the world. It should be that the world interacts with them.
Example in SOP (subject-oriented programming)
In english would be: "john eats pasta".
In REAL OOP:
"the pasta is being eaten by john".
So, in real OOP, object should be able to dynamically change the state of every other object is gonna interact with them.
like, we have an object Dog, and the method Dog.ownedby(Person owner), so the Dog object should change an inner variable of 'owner' object, like owner.dog = this;.
The only real OOP exist in some window toolkit, something like Button.attachto(Window).
You're programming subjects that do actions and interact with the world. It should be that the world interacts with them.
Example in SOP (subject-oriented programming)
Person john;
Food pasta;
john.eat(pasta);In english would be: "john eats pasta".
In REAL OOP:
Person john;
Food pasta;
pasta.eatenby(john)"the pasta is being eaten by john".
So, in real OOP, object should be able to dynamically change the state of every other object is gonna interact with them.
like, we have an object Dog, and the method Dog.ownedby(Person owner), so the Dog object should change an inner variable of 'owner' object, like owner.dog = this;.
The only real OOP exist in some window toolkit, something like Button.attachto(Window).