Re: Polymorphism [was] [Fwd: Re: [PHP] Parents constructor]
| From: | Tony Marston | Date: | Fri, 05 May 2006 07:54:20 +0000 |
| Subject: | Re: Polymorphism [was] [Fwd: Re: [PHP] Parents constructor] | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-235621@lists.php.net to get a copy of this message | ||
""Richard Lynch"" <ceo@l-i-e.com> wrote in message
news:56540.67.184.121.112.1146736672.squirrel@www.l-i-e.com...
> On Wed, May 3, 2006 9:17 am, Jochem Maas wrote:
>> BUT there is a fourth form of polymorphism - one I would argue if the
>> most common form when speaking about polymorphism with respect to
>> programming,
>> namely the ability to derive a subclass from more than one base class
>> (simutaneously),
>> this is something that php cannot do (thank <deity>).
>
> In my CS classes we always called that "multiple inheritence"
>
> I ain't saying "multiple inheritence" isn't a subclass* of
> "polymorhism" or anything, just that that's what we called it.
>
> This was 20 years ago, and I've sat through WAY too many arguments
> about what is or isn't polymorphism to count.
>
> I think anybody would agree that PHP's support for polymorphism is
> "minimal, at best" :-)
I disagree. PHP's support for polymorphism is all that it need be. The
problem is that what some people call "polymorphism" is nothing of the sort.
The simplest definition of polymorphism is "same interface, different
implementation" which means that different objects can have identical
interfaces which produce different results. It has nothing to do with
multiple inheritance or overloading.
No wonder so many people are confused about OOP if they cannot even
understand what the basic concepts mean.
--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org