Lukas Kahwe Smith wrote:
>
> On 19.11.2007, at 14:24, Alexey Zakhlestin wrote:
>
>> On 11/19/07, Lukas Kahwe Smith <[EMAIL PROTECTED]> wrote:
>>>
>>> On 19.11.2007, at 14:05, Alexey Zakhlestin wrote:
>>>
>>>> On 11/19/07, Lukas Kahwe Smith <[EMAIL PROTECTED]> 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.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to