Hi Nate,

> Any thoughts or feedback would be very much appreciated.  :-)

The scoping problem is very deeply related to the $this issue: Should
one be able to switch the change of a closure by re-binding it to
another object or not?

It was also an open point in my RFC on object extension in general -
which describes the different approaches to $this and scoping and the
reason why we have do decide BEFORE adding support for that which way we
want it since otherwise we don't be able to change the behaviour later
on if we decide against it.

So, it may be a small WTF that the scope is not inherited at all. But if
we re-add support for that, useful as it may be, there will be no
possibility of changing that in the future - and since the scope is
deeply related to $this, it could be that the then chosen solution for
$this is also incompatible with the scoping version we choose now.

When I reverted OOP support for beta 1, I carefully made sure that the
current implementation in PHP 5.3 is done in such a way that OOP support
may be added later on without dictating which type of OOP support it
will be. Any change to that would limit future choices. And since nobody
here actually continued the OOP <-> Closure discussion for post-5.3
after my revert in beta 1, I don't think that discussion will have
progressed far enough for RC 1 that re-adding scoping behaviour would be
a wise idea.

Regards,
Christian

Just FYI: My stance on the issue hasn't changed, I'm still in favor of
the original behaviour Dmitry and I designed + addition of bindTo () for
dynamic object extension, see:
<http://wiki.php.net/rfc/closures/object-extension>


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

Reply via email to