Re: [PHP4BETA] calling member in parent class
| From: | chagenbu at wso dot williams dot edu | Date: | Sun, 06 Feb 2000 02:00:02 +0000 |
| Subject: | Re: [PHP4BETA] calling member in parent class | ||
| References: | 1 2 3 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-9864@lists.php.net to get a copy of this message | ||
Quoting Zeev Suraski <zeev@zend.com>:
> Regardless of your code size, PHP allows you to have a class
> definition at the scope of a single file, and a single file only. That means
> that no matter how big your code is, changing the inherited class name, for a
> given derived class, is exactly one search&replace. So it boils down to
> this difference - a replacement of the parent class name in the 'extends'
> statement, vs. a single search and replace. No noticeable difference
> in my book...
I don't follow. If you use a code library - via include(), require(), or
possibly use() now - and you extend classes that the library provides, and in
your extended classes you call parent::foomethod()...
If the library changes the name of a class you've used, you have effects _far_
outside of one file. I buy the argument that it's not an essential feature, and
that you want to keep the language simple. But unless I'm missing something
major, the argument that you can't have effects outside of a single file doesn't
hold water.
Note that this isn't really an OO issue as much as it is a reusability issue.
Features like this would make it easier to tack together php apps with
"off-the-shelf" components, available at the growing number of
classes/components sites. RAD, in a sense - you take a module, you use it, and
you are insulated from changes in all but the interface of that module.
Hey, I can dream. :)
-chuck