in reply to perspective and object-disorientation

When we look at the same thing from DIFFERENT "perscpective", we are looking at exactly the SAME thing, there is NO doubt about this, but we focus on DIFFERENT attributes, as we need.

To be frank, my first feeling is that, Perl or @ISA is not quite relevant to what we want to talk about here, actually this is more a question about OO ITSELF.

Let's look at your example. An employee could be a father, a mother, a musician (although might be a lousy one ;-).

  1. What do you want to abstract from the real world?

    Each application always has its PARTICULAR PURPOSE. For example, if this is a HR (Human resource) application, we want to abstract employee as a class, but most likely not musician or father. If this is a system for a special group of musicians in my city, then I would abstract musician as a class.

    Then where would the other information go? You can argure that you obviously care whether a employee is a musician, so you may use him for your company's Xmas party.

    Very good, but those should really be treated as attributes rather than a separate class. Again, this is about what the PURPOSE is, and what the FOCUS is.

  2. Is this a subclass or an attribute?

    This question may sound stupid (or way too obvious) to some people, but actually not. Say there is one employee, and he has two attributes:
    1. He is a father;
    2. He is a manager;
    You can treat both as attributes, but you may also think that, the attribute whether a person is a manager is important enough, that a new class should be abstracted as a subclass of employee.

    Again this is about PURPOSE. When it is extreamly reasonable to abstract manager as a subclass in a HR system, it is definitely uneccessary to abstract a manager class in a "house hold management system", just because the father of that family happens to be a manager in his work place, because it is irrelevant to the PURPOSE of your "house hold management system".

  3. Last but not least, the POWER of human thinking is that, we gather all relevant information, and then FILTER and SIMPLIFY what we see, and UNDERSTAND it from a particular PERSPECTIVE, base on our purpose and focus. We try to UNDERSTAND the world around us, within the capbility and capicity of our brain, but not try to be CONFUSED by it.



Ctrl-Z, you are not sinned. No body is sinned because he thinks, anyone thinks is blessed.
  • Comment on Re: perspective and object-disorientation