Re: What databases have taught me
From: David Cressey <dcressey_at_verizon.net>
Date: Fri, 23 Jun 2006 15:17:20 GMT
Message-ID: <4CTmg.13$Ws2.9_at_trndny04>
Date: Fri, 23 Jun 2006 15:17:20 GMT
Message-ID: <4CTmg.13$Ws2.9_at_trndny04>
> > multi-dimensional. OO textbooks like to use animals as an example.
>
> Alas...
>
> > They
> > like to build a polyphormic hierarchy like this:
> > Fish
> > - Shark
> > - Tunar
> > Bird
> > - Eagle
> > - Condor
> > Mammal
> > - Horse
> > - Dolphin
> > - Bat
> > This is the correct zooligical hierachy.
>
> Yes, and a very bad example of the use of subtyping in OO. Also, it
> somehow relies on the assumption that polymorphism is conditionned by
> class inheritance - which, while somehow the case with languages like
> Java, is not necessarily true for all OOPLs.
>
> > But what if there are features
> > (or behavior) that are common for all animals that can fly or that
> > lives in water?