Hello All,
I had a chat with Etienne and Stas on IRC to try and figure out how to
approach things. We decided that its best to go with only having
parent:: be forwarding for alpha1. Depending on user feedback we might
revisit the topic, but for now it seems that with this solution the
Hello,
On Mon, Jul 21, 2008 at 9:48 PM, Lukas Kahwe Smith [EMAIL PROTECTED] wrote:
Etienne will handle applying the patch and doing at least a base line
summary of the decision process, so that we have this as a reference if we
ever revisit the topic.
I can't apply the patch, as it requires
Hi!
I can't apply the patch, as it requires ZE2 karma which I don't have.
I'll write a RFC for it though.
Please add there a link to the newest patch, since there was a lot of
variations around...
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED] http://www.zend.com/
Yes. I use instanceof_function() in the patch.
Thanks. Dmitry.
Stanislav Malyshev wrote:
Hi!
Note that called_scope is passed only to static methods of __parent__
class. I cannot imagine the use-case with intersecting LSBs in the same
class hierarchy. Could you please write the example.
Hi!
Note that called_scope is passed only to static methods of __parent__
class. I cannot imagine the use-case with intersecting LSBs in the same
class hierarchy. Could you please write the example.
OK. But how do you know if called class is parent of the current scope
or not? Wouldn't you
Hi!
Yes. I use instanceof_function() in the patch.
Doesn't it mean we'd have this full tree lookup on every static call?
I'm not sure it's a very good idea then.
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED] http://www.zend.com/
(408)253-8829 MSN: [EMAIL PROTECTED]
Hi Stas,
Note that called_scope is passed only to static methods of __parent__
class. I cannot imagine the use-case with intersecting LSBs in the same
class hierarchy. Could you please write the example.
Thanks. Dmitry.
Stanislav Malyshev wrote:
Hi!
Each call to static method of parent
Here, I'm half-agree with you. I would prefer full forwarding or not
forwarding at all.
Thanks. Dmitry.
Stanislav Malyshev wrote:
Hi!
With current proposal we can call the same static method from the same
context with different behavior parent::foo(), self::foo(), A::foo().
That's
Hi Etienne,
I took a look into the patch and I don't like it all.
At first, I don't see any consistency there.
Why parent:: does forwarding but self::, static:: and class names don't?
At second, it's too complicated.
I would propose more consistent (from my point of view) and simpler patch.
On Tue, 8 Jul 2008, Dmitry Stogov wrote:
I took a look into the patch and I don't like it all.
At first, I don't see any consistency there.
Why parent:: does forwarding but self::, static:: and class names don't?
At second, it's too complicated.
I would propose more consistent (from my
5.2 didn't have static:: so it cannot be a BC break.
Thanks. Dmitry.
Derick Rethans wrote:
On Tue, 8 Jul 2008, Dmitry Stogov wrote:
I took a look into the patch and I don't like it all.
At first, I don't see any consistency there.
Why parent:: does forwarding but self::, static:: and
On Tue, Jul 8, 2008 at 3:39 PM, Dmitry Stogov [EMAIL PROTECTED] wrote:
I took a look into the patch and I don't like it all.
At first, I don't see any consistency there.
Why parent:: does forwarding but self::, static:: and class names don't?
class names don't because, people expect their
Class names are already context-dependent.
?php
class Foo {
function test() {
var_dump($this);
}
}
class Bar extends Foo {
function test() {
Foo::test(); /* this is a dynamic method call */
}
}
$x = new Bar();
$x-test();
?
Thanks.
-- Forwarded message --
From: Mike Lively [EMAIL PROTECTED]
Date: Tue, Jul 8, 2008 at 6:23 AM
Subject: Re: [PHP-DEV] Re: parent:: forwarding
To: Dmitry Stogov [EMAIL PROTECTED]
On Tue, Jul 8, 2008 at 4:39 AM, Dmitry Stogov [EMAIL PROTECTED] wrote:
Each call to static method
method (with the same behavior).
Thanks. Dmitry.
Mike Lively wrote:
-- Forwarded message --
From: Mike Lively [EMAIL PROTECTED]
Date: Tue, Jul 8, 2008 at 6:23 AM
Subject: Re: [PHP-DEV] Re: parent:: forwarding
To: Dmitry Stogov [EMAIL PROTECTED]
On Tue, Jul 8, 2008
PROTECTED]
Date: Tue, Jul 8, 2008 at 6:23 AM
Subject: Re: [PHP-DEV] Re: parent:: forwarding
To: Dmitry Stogov [EMAIL PROTECTED]
On Tue, Jul 8, 2008 at 4:39 AM, Dmitry Stogov [EMAIL PROTECTED] wrote:
Each call to static method of parent class (it doesn't mater if it was
done using parent
Hi!
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.
That would make it impossible to do non-forwarding call. Which means you
can't use something like ActiveRecord pattern (which uses LSB)
Hi!
With current proposal we can call the same static method from the same
context with different behavior parent::foo(), self::foo(), A::foo().
That's exactly what I said when I explained why I didn't like the idea
of chainging parent::. I was told I am the only one that doesn't like
18 matches
Mail list logo