Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:30036 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 135 invoked by uid 1010); 2 Jun 2007 02:49:38 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 116 invoked from network); 2 Jun 2007 02:49:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jun 2007 02:49:38 -0000 Authentication-Results: pb1.pair.com header.from=dohpaz@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=dohpaz@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 66.249.92.174 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: dohpaz@gmail.com X-Host-Fingerprint: 66.249.92.174 ug-out-1314.google.com Linux 2.4/2.6 Received: from [66.249.92.174] ([66.249.92.174:12153] helo=ug-out-1314.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7A/13-63519-0CAD0664 for ; Fri, 01 Jun 2007 22:49:37 -0400 Received: by ug-out-1314.google.com with SMTP id m2so385574uge for ; Fri, 01 Jun 2007 19:49:33 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=elLpvnSVBJOB4LoCTmG6hdiA7ahUv/ZFlznCexa49s5NAbJRP8U5xZ/CaeuMu8P7s+Ra/9aujxgRhRBLzkd83yALwfrPi4KHLh2c+ES0IU8gFikljZSLW1wvrUKGubcfwaBCCQrf3ciLAGuB+bvieqMOqupP7UeKgArWhqI93o4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=F9rlpjYiJhJA4CGZTEWjn2jLxdLuOGQWI2evBPUTUj8i+rKE0Xv+RA5KeLYDCDeD3OmLkqnGhAeA/8cyiCuli41La/sbBIBTxsvAd8dom0+4NVJspl0x+uFKji9cZLGmUp9RzSxiz9eLBjnKg3prCJN7AnsN6V8NQCBUyGw4aTU= Received: by 10.78.185.15 with SMTP id i15mr1421989huf.1180752573252; Fri, 01 Jun 2007 19:49:33 -0700 (PDT) Received: by 10.78.149.16 with HTTP; Fri, 1 Jun 2007 19:49:33 -0700 (PDT) Message-ID: Date: Fri, 1 Jun 2007 22:49:33 -0400 To: "Bart de Boer" Cc: internals@lists.php.net In-Reply-To: <4660A44F.6060802@mediawave.nl> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11692_6215103.1180752573212" References: <56275.216.230.84.67.1180484964.squirrel@www.l-i-e.com> <465D9040.6030001@iamjochem.com> <43689.216.230.84.67.1180643866.squirrel@www.l-i-e.com> <465FC76B.6030208@mediawave.nl> <4660A44F.6060802@mediawave.nl> Subject: Re: [PHP-DEV] late static binding From: dohpaz@gmail.com ("Ken Stanley") ------=_Part_11692_6215103.1180752573212 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline > > That's right. And that's exactly why it's such a bad idea to call it > static::. It's the scope resolution operator which already makes them > static, not their name. (I'm sorry for catching you on your words ;) ) I agree that it is not the best name, just not as bad as some of the others. :) That's not right. Accessing the child class would only be possible from > within an instantiated object. Unlike parent::, you will never be able > to use static:: in a purely static context. Imagine there are multiple > child classes which all inherit from the same base class. If there's no > instance, PHP won't be able to know which child class to target with > child::, static:: or whateverkeyword:: since it can be any one of those > child classes. I agree. When I made my first post, I had not made this consideration. Since there's no use for it in a static context anyway, I think > static::, child:: or whateverkeyword:: would be confusing for > developers. Since this would only work from withing an instance, I > thought it might be a better idea to make static members accessible > through $this->. (I think I even expected this to work when I first > found out it didn't ;) ) > For the sake of argument, let's say that php did this; then anytime you needed this functionality, it would only be available in instantiated objects. That is a pretty limiting feature, and to me it would be meaningless. I say it is meaningless because if you instantiate an object, you can do a set up in the constructor to tell the parent what it needs to know without the late static binding. It may not be the perfect solution, but it would also be very far from a kludge at the same time. But, on the huge downside, this functionality would be lost on static methods and properties, where I feel it would be at the greatest benefit. Honestly, I admit that I am not as smart as these guys who built -- and continue to build -- PHP. I personally have no further suggestions on what to do about this problem, but I want thank everybody for their time -- and indulgences -- in listening to me and educating me. I will continue to watch this forum so I can learn more. Have a great weekend everybody! :) -- It looked like something resembling white marble, which was probably what it was: something resembling white marble. -- Douglas Adams, "The Hitchhikers Guide to the Galaxy" ------=_Part_11692_6215103.1180752573212--