Re: Attaching a behavior only to multiple classes.
From: H. S. Lahman (h.lahman_at_verizon.net)
Date: 03/19/05
- Next message: dean hully: "Factory Design Pattern and Select Case"
- Previous message: alex99_at_medcentral.com.au: "Re: OO vs. RDB challenge"
- In reply to: Doc O'Leary: "Re: Attaching a behavior only to multiple classes."
- Next in thread: Doc O'Leary: "Re: Attaching a behavior only to multiple classes."
- Reply: Doc O'Leary: "Re: Attaching a behavior only to multiple classes."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 19 Mar 2005 16:57:21 GMT
Responding to O'Leary...
>>No, methods are not first class objects.
>
>
> Then that pretty much ends the discussion.
If not this, then...
>>Because of the complexity of
>>most problems spaces, an object will have multiple properties. (That is
>>the reason, in no small part, why we have subclassing to deal with minor
>>variations is set membership.)
>
>
> You're approach is very dated and you should really look at some
> prototype-based OO to broaden your horizons. Classes are *not*
> necessary for OO development, and once you get your mind around a system
> that uniformly has only objects, you can get past the notion of tying a
> method to just one class.
...certainly this. OO abstraction and relationships are based on sets
and object identity within those sets. That's why all OOA/D
methodologies start with creating a Class Model. Even the OOPL type
systems are mapped in terms of classes. Saying classes are not
necessary to OO development is like saying that functions are not
necessary to procedural development.
What you seem to be advocating is some sort of hybrid of functional
programming having OO features. That doesn't work because they are
fundamentally different and conflicting software construction paradigms.
>>As far as the second question is concerned: No. In OOA/D classes define
>>set membership, not types. The criterion for set membership is having a
>>particular suite of properties. If a set of properties defining the
>>Bird set requires the Flight property, then no critter without that
>>property can be a member of the set. The reason that subclassing exists
>>is to resolve exactly these sorts of issues related to specialized
>>property sets.
>
>
> You seem to be saying that polymorphism should only be through
> subclassing. You are wrong.
I did not say that the only polymorphism is through subclassing. That
sort of polymorphism is inclusion polymorphism (aka inherent
polymorphism). Parametric polymorphism (aka genericity) is at least as
important to OO development as inclusion polymorphism and it does not
involve subclassing. Other forms of polymorphism supported in OO
development are ad hoc, limited, and overload polymorphism.
*************
There is nothing wrong with me that could
not be cured by a capful of Drano.
H. S. Lahman
hsl@pathfindermda.com
Pathfinder Solutions -- Put MDA to Work
http://www.pathfindermda.com
blog: http://pathfinderpeople.blogs.com/hslahman
(888)OOA-PATH
- Next message: dean hully: "Factory Design Pattern and Select Case"
- Previous message: alex99_at_medcentral.com.au: "Re: OO vs. RDB challenge"
- In reply to: Doc O'Leary: "Re: Attaching a behavior only to multiple classes."
- Next in thread: Doc O'Leary: "Re: Attaching a behavior only to multiple classes."
- Reply: Doc O'Leary: "Re: Attaching a behavior only to multiple classes."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|