Re: [PHP4BETA] calling member in parent class
| From: | Matthew Hixson | Date: | Fri, 04 Feb 2000 19:14:01 +0000 |
| Subject: | Re: [PHP4BETA] calling member in parent class | ||
| References: | 1 2 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-9829@lists.php.net to get a copy of this message | ||
On Fri, 04 Feb 2000, Stefan Lindmark - Sun Sweden - SE Manager wrote:
>
> Yes, it's true that you will have to know the name of the parent anyway,
> but that doesn't eliminate the value of a general syntax.
>
> It is still not a compelling thought of having that name hard coded into
> the code in the derived class. You wouldn't duplicate the same integer
> value across code, rather define it once and use a named constant.
> Having "parent->method()" means less potential bugs while being obvious
> for programmers coming from other OO-like languages.
>
> There will always be work-arounds, but they tend to be author-specific
> and can make reading others' code more difficult.
I think this is a great idea. If I were to change the name of the parent class
I sure wouldn't want to go through all the rest of my source and change
everything that extended its parent.
-M@
--
Matthew Hixson
Code Mangler
Vista.com
Bringing Small Business Online