Not quite, I think. The hyponymy is an issue at instantiation time, not query time. It impacts the way an object is instantiated in terms of the features inherited from the contingent base classes.
Why? If I move collections at run time, aren't I changing my hyponym?
In terms of your example, I think the type names you offer (infant, young adult,...,Senior) are really state names a given instance may be in as the result of an ageing behavior. But I don't want this example to become the focus of this thread; so let's not chew this bone.
There is one aspect of the example that is relevant, I think. I specifically choose this example because many of the "states" overlap - which, I think, isn't allowed in pure state machine theory (but, as always, I stand to be corrected). But for the sake of the argument, lets assume that assertion is true. Therefore, these (although they look like states - aren't) From what you're saying, although they look like subtypes, they aren't. So...
Perhaps we have another Semantic Impedance point with UML?
Yes, I think you're right here...
I attended a talk about 7 years ago on "Classless Objects". The speaker's thesis was that you don't need classes, objects can organise themselves into groups by means of queries on their attributes. "Get me all the objects are people and whose age is between 18 and 25". (the equivalent of the youngAdult view previously) I asked him is he thought this was classifying the objects? He agreed... So I asked him why do you think a class is called a Class?
So much for classless objects... The question for me is:
if I can classify an object, then there has to exist a class corresponding to that classification. Most OO languages only handle static assignment of an object to a class. But this maybe just a technology impediment. Conceptually, I have no problem with objects being able to behave differently depending upon their dynamic state. In particular, coming from a Design by Contract viewpoint, the ability to define specific constraints in specific contexts I think is a very powerful one. If I can collect all these ideas into a "dynamic" Class than great... Now if only I could find a language to implement this in...
Paolo
[size=0]©2006 Paolo Cantoni, -Semantica-[/size]