Re: Static vs. non static

From: Date: Wed, 25 Jan 2006 06:55:18 +0000
Subject: Re: Static vs. non static
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-21678@lists.php.net to get a copy of this message
As you're using this in the context of the object, I don't think it's too confusing. I actually find the latter more confusing and think it's best to stick to what we have today. Andi At 12:08 AM 1/23/2006, Lukas Smith wrote:
Andi Gutmans wrote:
Yes, this was by design. Via class it should be ::method() and via object it should be ->method(). Why do you think this is wrong? I think it actually makes a lot of sense and don't see what we gain from allowing to call self->method(). If there's a good reason, I'd be open to it though.
I just gave a course in PHP5 OOP and this syntax overlap with static calls that do not end up being static seems confusing. If I get Marcus proposal properly he would then allow changing things from: parent::method(); to parent->method(); This would add a totally separate syntax, which would make it clear to users that this is in fact not a static call. It looks ugly, but I understand what he is aiming at. regards, Lukas


« previous php.internals (#21678) next »