Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33348 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23616 invoked by uid 1010); 20 Nov 2007 02:33:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 23601 invoked from network); 20 Nov 2007 02:33:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Nov 2007 02:33:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=m@digitalsandwich.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=m@digitalsandwich.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain digitalsandwich.com does not designate 68.230.241.44 as permitted sender) X-PHP-List-Original-Sender: m@digitalsandwich.com X-Host-Fingerprint: 68.230.241.44 fed1rmmtao102.cox.net Solaris 10 (beta) Received: from [68.230.241.44] ([68.230.241.44:37122] helo=fed1rmmtao102.cox.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AF/7C-50425-27742474 for ; Mon, 19 Nov 2007 21:33:24 -0500 Received: from fed1rmimpo03.cox.net ([70.169.32.75]) by fed1rmmtao102.cox.net (InterMail vM.7.08.02.01 201-2186-121-102-20070209) with ESMTP id <20071120023320.BIWM6284.fed1rmmtao102.cox.net@fed1rmimpo03.cox.net>; Mon, 19 Nov 2007 21:33:20 -0500 Received: from [192.168.0.102] ([68.96.248.22]) by fed1rmimpo03.cox.net with bizsmtp id EqZJ1Y0060Vk8yk0000000; Mon, 19 Nov 2007 21:33:18 -0500 Message-ID: <4741D6E4.3080508@digitalsandwich.com> Date: Mon, 19 Nov 2007 18:33:08 +0000 User-Agent: Thunderbird 2.0.0.6 (X11/20071108) MIME-Version: 1.0 To: Lukas Kahwe Smith CC: Alexey Zakhlestin , PHP Developers Mailing List References: <474021AD.3020902@avalon.aut.bme.hu> <06685887-B14F-4933-8F71-DFAB0D9B0E53@pooteeweet.org> <24B993AF-C3D4-4144-AD21-EA745B309CAC@pooteeweet.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] late static binding php6 From: m@digitalsandwich.com (Mike Lively) Lukas Kahwe Smith wrote: > > On 19.11.2007, at 14:24, Alexey Zakhlestin wrote: > >> On 11/19/07, Lukas Kahwe Smith wrote: >>> >>> On 19.11.2007, at 14:05, Alexey Zakhlestin wrote: >>> >>>> On 11/19/07, Lukas Kahwe Smith wrote: >>>> >>>>> I think the point of Stas reply was to use self:: instead of >>>>> parent::. >>>> >>>> how would self help? that would mean calling this exact method, not >>>> the method of parent-class >>> >>> that way you could add the class name as a second parameter to the >>> parent method, without having to type it out in every call. Anyways, >>> I think the current situation is quite clear to me. then again, I >>> forgot if we also added new magic constants to go along with >>> __CLASS__ for this (aka __SELF__)? >> >> that's possible, but some more "magic" seems to be "natural" here. >> >> As I and several others proposed earlier the best option would be: >> >> parent::method() thinks it is the same class as a caller >> ClassName::method() thinks it is ClassName >> >> this would be the least-surprise situation > > actually i do not think this is obviously more intuitive than what we > currently have. also that would introduce BC issues. so i think adding > some new magic constants (if they are not yet added) would probably > solve the situation more or less, plus you have self:: if you need to > do something more complex. of course it adds some more method calls. > > regards, > Lukas > There wouldn't be any BC issues, the same methods wind up getting called, the only thing affected here is the resolution of static:: which obviously isn't set in stone until 5.3 is out.