Re: [PHP-DEV] Re: parent:: forwarding

2008-07-21 Thread Lukas Kahwe Smith
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

Re: [PHP-DEV] Re: parent:: forwarding

2008-07-21 Thread Etienne Kneuss
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

Re: [PHP-DEV] Re: parent:: forwarding

2008-07-21 Thread Stanislav Malyshev
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/

[PHP-DEV] Re: parent:: forwarding

2008-07-14 Thread Dmitry Stogov
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.

[PHP-DEV] Re: parent:: forwarding

2008-07-14 Thread Stanislav Malyshev
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

[PHP-DEV] Re: parent:: forwarding

2008-07-14 Thread Stanislav Malyshev
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]

[PHP-DEV] Re: parent:: forwarding

2008-07-09 Thread Dmitry Stogov
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

Re: [PHP-DEV] Re: parent:: forwarding

2008-07-09 Thread Dmitry Stogov
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

[PHP-DEV] Re: parent:: forwarding

2008-07-08 Thread Dmitry Stogov
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.

Re: [PHP-DEV] Re: parent:: forwarding

2008-07-08 Thread Derick Rethans
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

Re: [PHP-DEV] Re: parent:: forwarding

2008-07-08 Thread Dmitry Stogov
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

Re: [PHP-DEV] Re: parent:: forwarding

2008-07-08 Thread Alexey Zakhlestin
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

Re: [PHP-DEV] Re: parent:: forwarding

2008-07-08 Thread Dmitry Stogov
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.

[PHP-DEV] Re: parent:: forwarding

2008-07-08 Thread Mike Lively
-- 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

Re: [PHP-DEV] Re: parent:: forwarding

2008-07-08 Thread Dmitry Stogov
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

Re: [PHP-DEV] Re: parent:: forwarding

2008-07-08 Thread Etienne Kneuss
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

[PHP-DEV] Re: parent:: forwarding

2008-07-08 Thread Stanislav Malyshev
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)

Re: [PHP-DEV] Re: parent:: forwarding

2008-07-08 Thread Stanislav Malyshev
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