Re: [PHP4BETA] OOP issue
| From: | Kristian Köhntopp | Date: | Mon, 15 Nov 1999 16:44:43 +0000 |
| Subject: | Re: [PHP4BETA] OOP issue | ||
| References: | 1 2 3 4 5 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-6251@lists.php.net to get a copy of this message | ||
Christian Schneider wrote:
> After seeing Andi Gutmans' mail about changing $a['x'] to $a{'x'} to
> clean up the language I figured it would make sense to discuss some more
> points on how to enhance the language.
Oh, and can be have fixed name constructors, please? Like
class X {
function _init() {
print "I am a constructor\n";
}
}
$x = new X; // prints 'I am a constructor'
and if you rename X to Y, this would still print
'I am a constructor', without need to rename the
constructor. And in a subclass
class Z extends X {
function _init() {
$super->init();
print "I am a subclass constructor\n";
}
}
you could extend the constructor without knowing from
which superclass you are derived and _without_ changing
all constructors in all superclasses once you renamed a
superclass... You _could_ still use namespaces to call
X::_init(), if you insist...
--
Kristian Köhntopp, NetUSE Kommunikationstechnologie GmbH
Siemenswall, D-24107 Kiel, Germany, +49 431 386 436 00
Using PHP3? See our web development library at
http://phplib.netuse.de/ (We have moved! Update your
bookmarks!)