RE: [PHP-DEV] Static vs. non static
| From: | Dmitry Stogov | Date: | Tue, 24 Jan 2006 07:38:40 +0000 |
| Subject: | RE: [PHP-DEV] Static vs. non static | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-21666@lists.php.net to get a copy of this message | ||
Hi Marcus,
I like parent::foo() mach more then parent->foo() and mach-mach more then
$this->parent::foo().
Marcus, could you please explain why do you like to change syntax?
Are you looking from ZE or SPL side? :) (I just saw that your latest patches
were releated to static methods).
Thanks. Dmitry.
> -----Original Message-----
> From: Marcus Boerger [mailto:helly@php.net]
> Sent: Monday, January 23, 2006 10:28 PM
> To: Andi Gutmans; Sebastian Bergmann
> Cc: internals@lists.php.net
> Subject: Re: [PHP-DEV] Static vs. non static
>
>
> Hello Andi, Sebastian,
>
> Monday, January 23, 2006, 9:25:29 AM, Sebastian wrote:
>
> > Lukas Smith schrieb:
> >> If I get Marcus proposal properly he would then allow
> changing things
> >> from:
> >> parent::method();
> >>
> >> to
> >>
> >> parent->method();
>
> > If that is the case, then it would be consistent to allow
>
> > this->method()
> > this->attribute
> > parent->attribute
>
> parent->method() would work
> attributes are more than discussable and i don'T think we
> need anything more than $this->attibute for dynamic
> attibutes. And since you cannot overload protected or public
> attibutes or hide base class attibutes there is no need to
> provide a means of skipping hierarchy levels.
>
> If i was very pedantic i'd not propose 'baseclass->method()'
> but the formal correct '$this->baseclass::method()'. However
> i see the former as a very handy and clear shortcut. Another
> reason to go with the shortcut is that once we'd allow
> '$this->baseclass::method()' people would start to ask for
> '$obj->classname::method()' which is at somepoints usefull
> but is not exactly the KISS approach.
>
> Best regards,
> Marcus
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>