Re: [PHP4BETA] calling member in parent class

From: Date: Fri, 04 Feb 2000 19:44:09 +0000
Subject: Re: [PHP4BETA] calling member in parent class
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-9830@lists.php.net to get a copy of this message
On Fri, 4 Feb 2000, Matthew Hixson wrote: > 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. Why? It's a matter of a trivial search&replace, it's not as if it's a big dael... Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/

« previous php.version4 (#9830) next »