Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46068 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35500 invoked from network); 17 Nov 2009 09:59:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Nov 2009 09:59:06 -0000 Authentication-Results: pb1.pair.com header.from=mathieu.suen@easyflirt.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mathieu.suen@easyflirt.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain easyflirt.com designates 91.199.255.56 as permitted sender) X-PHP-List-Original-Sender: mathieu.suen@easyflirt.com X-Host-Fingerprint: 91.199.255.56 python-06.easyrencontre.com Linux 2.6 Received: from [91.199.255.56] ([91.199.255.56:48278] helo=mail.easyflirt.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 02/B2-20549-9E3720B4 for ; Tue, 17 Nov 2009 04:59:05 -0500 Received: from [127.0.0.1] (office.easyrencontre.com [78.155.152.6]) by mail.easyflirt.com (Postfix) with ESMTPSA id 6F76B6375E3 for ; Tue, 17 Nov 2009 10:59:02 +0100 (CET) Message-ID: <4B0273E5.9000606@easyflirt.com> Date: Tue, 17 Nov 2009 10:59:01 +0100 User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 CC: internals@lists.php.net References: <4B01A4C2.8030602@gmx.net> In-Reply-To: <4B01A4C2.8030602@gmx.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Closures and $this From: mathieu.suen@easyflirt.com (Mathieu Suen) Christian Seiler a écrit : > Hi, > > since a few months have passed since the last discussion on this topic > and perhaps people had time to gather some experience with the current > closure implementation in PHP 5.3 I'd like to restart the debate on > $this in closures and object extension. > > Foreword: The discussion should center on the future behaviour of PHP 6 > ONLY. Whether or not a backport is even possible (binary compability > etc.) or should even be done should be topic of a separate discussion > and should *NOT* influence the decision. The ONLY goal of this > discussion should be to agree on a SANE way of implementing $this for > closures for PHP 6. > > I've updated the original RFC I wrote a tiny bit (I didn't change much): > > > > The basic outline is the following: > > * In the first section I explain the general issue. > * In the second section I show the proposals that were made on > internals@ before I wrote the RFC. > * In the third section I compare the approaches and explain why > the approaches (B) and (D) are inconsistent. > * In the fourth section I propose a new approach (bindTo) that > was only briefly discussed after the original RFC. > > Please read the complete RFC and try to understand the points I'm trying > to make. If something is unclear, *please* ask first. In the past > discussion I had the impression that a lot of people understood only > partial aspects of the problem which made the discussion extremely > noisy. I believe that is a disservice to the issue. However, now we have > the huge advantage of NOT having an immanent deadline for a release. I > hope this will enable a consensus on this issue. > > Discuss away! > > Regards, > Christian > > IMHO I would put it that way: do you want to staticaly or dynamicaly bind $this? The same question apply for temporary varaible. IIRC you statically bind temporary with the 'use(..)' syntaxe. So why $this should be different. I agree on proposition A. -- Mathieu Suen