Re: [PHP4BETA] calling member in parent class
| From: | Zeev Suraski | Date: | Mon, 07 Feb 2000 19:10:52 +0000 |
| Subject: | Re: [PHP4BETA] calling member in parent class | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-9918@lists.php.net to get a copy of this message | ||
On Mon, 7 Feb 2000, Andrei Zmievski wrote:
> On Mon, 07 Feb 2000, Zeev Suraski wrote:
> > Was that question directed to me? Again, it doesn't really matter. In
> > both cases, you would have to:
> > 1. Modify the parent class (which is what we're talking about in the
> > first place).
> > 2. Modify any of its derived classes.
> >
> > The only difference is whether you modify just the word after the
> > 'extends' keyword, or all of the occurences of the parent class name in
> > the file that contains a given derived class.
>
> Tell me then, why does Java have keyword 'super'? I mean, they could
> also just rename the Parent classes whenever appropriate.
Regardless of my answer, another language having it is not a good reason
to add a feature to our language. At best, it's some sort of an excuse...
I just asked a friend of mine that is infinitely more fluent in Java than
I am, and he said that this is basically the only way to call parent
methods in Java (you can't call methods using a hardcoded class
name). Why Java picked that way? I don't know, you could argue that it's
better. But there's no question about it being functionaly equivalent to
allowing hardcoded name-based method calls.
I'll remind you all, again, that I'm not religiously against this
feature. I'm just saying that there's no doubt that it's not *necessary*,
as in, you can live just fine without it, and it won't impair your life in
any way. That means it's a low priority, and classified as something we
might do in the future if we have lots of free time, and if everybody
agrees that it's a good idea to do it (which is still questionable, even
though I don't have a well-established opinion about it yet). Finally,
because Zend is feature frozen, and as I promised two days ago, it's
*REALLY* feature-frozen now (bug fixes only), we won't add this in the
near future, definitely not before PHP 4.0 final.
Zeev
--
Zeev Suraski <zeev@zend.com>
http://www.zend.com/