Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43316 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70062 invoked from network); 11 Mar 2009 21:06:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Mar 2009 21:06:08 -0000 Authentication-Results: pb1.pair.com header.from=chris_se@gmx.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=chris_se@gmx.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.net designates 213.165.64.20 as permitted sender) X-PHP-List-Original-Sender: chris_se@gmx.net X-Host-Fingerprint: 213.165.64.20 mail.gmx.net Received: from [213.165.64.20] ([213.165.64.20:43257] helo=mail.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B8/EC-09289-EB728B94 for ; Wed, 11 Mar 2009 16:06:08 -0500 Received: (qmail invoked by alias); 11 Mar 2009 21:06:03 -0000 Received: from p54A15C34.dip.t-dialin.net (EHLO chris-se.dyndns.org) [84.161.92.52] by mail.gmx.net (mp022) with SMTP; 11 Mar 2009 22:06:03 +0100 X-Authenticated: #186999 X-Provags-ID: V01U2FsdGVkX1+0gWpSFpO06UJOjgeWo40y/dcQQ+xJQqwpGoL3vU GRp1Nfj10ki7uK Received: from [192.168.0.175] (HSI-KBW-082-212-059-033.hsi.kabelbw.de [82.212.59.33]) by chris-se.dyndns.org (Postfix) with ESMTP id C89FF6970; Wed, 11 Mar 2009 21:46:29 +0100 (CET) Message-ID: <49B827DE.9050806@gmx.net> Date: Wed, 11 Mar 2009 22:06:38 +0100 User-Agent: Thunderbird 2.0.0.19 (X11/20081209) MIME-Version: 1.0 To: Nate Abele CC: PHP Development References: <6E2164EC-F333-4E89-8EBD-6618BA321CD6@cakephp.org> In-Reply-To: <6E2164EC-F333-4E89-8EBD-6618BA321CD6@cakephp.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.59 Subject: Re: [PHP-DEV] Questions on closures and visibility From: chris_se@gmx.net (Christian Seiler) 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: