Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10236 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27516 invoked by uid 1010); 2 Jun 2004 00:26:28 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 27482 invoked from network); 2 Jun 2004 00:26:28 -0000 Received: from unknown (HELO mail2.speakeasy.net) (216.254.0.202) by pb1.pair.com with SMTP; 2 Jun 2004 00:26:28 -0000 Received: (qmail 13778 invoked from network); 2 Jun 2004 00:26:27 -0000 Received: from dsl027-161-088.atl1.dsl.speakeasy.net (HELO [10.0.0.101]) ([216.27.161.88]) (envelope-sender ) by mail2.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 2 Jun 2004 00:26:27 -0000 To: Hans Lellelid Cc: Ferdinand Beyer , Timm Friebe , internals@lists.php.net In-Reply-To: <40BD1706.1010202@velum.net> References: <20040601131122.36657.qmail@pb1.pair.com> <40BCF985.26931.1418D27@localhost> <40BD1706.1010202@velum.net> Content-Type: text/plain Message-ID: <1086135985.2774.4.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 01 Jun 2004 20:26:25 -0400 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Use of 'self' in static function in subclass From: adam@bregenzer.net (Adam Bregenzer) On Tue, 2004-06-01 at 19:53, Hans Lellelid wrote: > Yeah +1 on self:: binding at runtime. I can't really imagine a case > where you would want to refer to 'self' as the class that contains the > method *and not* the overridden method in invoked class (if it exists). > Binding this at runtime will introduce many new design possibilities > with static classes and will also make self:: consistent with $this-> > behavior for objects. +1, I agree completely. I think it is critical to have a way to be able to have a static method call another static method in the same class that respects inheritance. If a developer wanted a call to not respect inheritance the class's name can be used instead of self with the same results (increased code maintenance should the class name change notwithstanding). -- Adam Bregenzer adam@bregenzer.net http://adam.bregenzer.net/