Re: Re: parent:: forwarding
| From: | Dmitry Stogov | Date: | Tue, 08 Jul 2008 14:17:30 +0000 |
| Subject: | Re: Re: parent:: forwarding | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-38852@lists.php.net to get a copy of this message | ||
Hi Mike,
Yes. It was the initial proposal that was quite consistent.
With current proposal we can call the same static method from the same
context with different behavior parent::foo(), self::foo(), A::foo().
I didn't get why can I call parent's method, but cannot call "self" or
grand-parent's method (with the same behavior).
Thanks. Dmitry.
Mike Lively wrote:
> ---------- Forwarded message ----------
> From: Mike Lively <mjlivelyjr@gmail.com>
> Date: Tue, Jul 8, 2008 at 6:23 AM
> Subject: Re: [PHP-DEV] Re: parent:: forwarding
> To: Dmitry Stogov <dmitry@zend.com>
>
>
>
>
> On Tue, Jul 8, 2008 at 4:39 AM, Dmitry Stogov <dmitry@zend.com> wrote:
>
>> Each call to static method of parent class (it doesn't mater if it was
>> done using parent:: or something else) assumes forwarding of called
>> context.
>>
>
> Isn't this what the original LSB patches did and it was determined that
> letting everything forward was a bad idea?
>
> http://marc.info/?l=php-internals&m=118995456612295&w=2
>
> The idea now is that we need a combination. static class names don't forward
> called context but parent:: does. If I could only choose between always
> forwarding called context and never forwarding called context (for parent::
> and class names) I would rather always forward so this wouldn't be the end
> of the world for me, but I do believe the mixture is a more flexible way of
> handling things.
>
> On a different note, is that functionality introduced by the patch you don't
> like or is it the specific implementation? Is there a better way to
> implement it and retain the functionality it introduces? (for my own
> benefit)
>
> -Mike Lively
>