Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33312 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65791 invoked by uid 1010); 19 Nov 2007 13:57:27 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 65776 invoked from network); 19 Nov 2007 13:57:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Nov 2007 13:57:26 -0000 Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 85.10.196.195 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 85.10.196.195 serveforce1.backendmedia.com Linux 2.6 Received: from [85.10.196.195] ([85.10.196.195:59745] helo=serveforce1.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/10-64472-54691474 for ; Mon, 19 Nov 2007 08:57:26 -0500 Received: from [192.168.5.106] (cust.static.84-253-51-151.cybernet.ch [84.253.51.151]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) by serveforce1.backendmedia.com (Postfix) with ESMTP id 54E821224197; Mon, 19 Nov 2007 14:57:50 +0100 (CET) In-Reply-To: References: <474021AD.3020902@avalon.aut.bme.hu> <06685887-B14F-4933-8F71-DFAB0D9B0E53@pooteeweet.org> <24B993AF-C3D4-4144-AD21-EA745B309CAC@pooteeweet.org> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: Cc: "PHP Developers Mailing List" Content-Transfer-Encoding: 7bit Date: Mon, 19 Nov 2007 14:57:11 +0100 To: Alexey Zakhlestin X-Mailer: Apple Mail (2.752.3) X-backendmedia-com-MailScanner-Information: Please contact the ISP for more information X-backendmedia-com-MailScanner: Found to be clean X-backendmedia-com-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=0, required 6) X-backendmedia-com-MailScanner-From: mls@pooteeweet.org X-Spam-Status: No Subject: Re: [PHP-DEV] late static binding php6 From: mls@pooteeweet.org (Lukas Kahwe Smith) 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