Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46439 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53021 invoked from network); 16 Dec 2009 01:30:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Dec 2009 01:30:47 -0000 Authentication-Results: pb1.pair.com header.from=mike@rile.ca; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mike@rile.ca; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain rile.ca from 216.221.81.30 cause and error) X-PHP-List-Original-Sender: mike@rile.ca X-Host-Fingerprint: 216.221.81.30 smtp3.cogeco.ca Received: from [216.221.81.30] ([216.221.81.30:54618] helo=fipsb03.cogeco.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F5/03-33900-548382B4 for ; Tue, 15 Dec 2009 20:30:46 -0500 X-SBRS: None X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsYEAF7HJ0sYJBCT/2dsb2JhbACEC41MtTiQIgqBJYIqUgQ X-IronPort-AV: E=Sophos;i="4.47,403,1257138000"; d="scan'208";a="76394671" Received: from d24-36-16-147.home1.cgocable.net (HELO mikepc) ([24.36.16.147]) by fipsb03.cogeco.net with ESMTP; 15 Dec 2009 20:30:43 -0500 To: "'Christian Seiler'" , "'internals'" References: <4B01A4C2.8030602@gmx.net> <4B27DD0B.1070303@gmx.net> <6571303B-82D2-43E4-8550-E2B9420BA241@pooteeweet.org> <4B27E7A4.6030503@gmx.net> In-Reply-To: <4B27E7A4.6030503@gmx.net> Date: Tue, 15 Dec 2009 20:28:42 -0500 Message-ID: <000001ca7def$1a1bb680$4e532380$@ca> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acp9v7kHeIJGqueiQvO8faMtlCTmNQALwxvw Content-Language: en-ca Subject: RE: [PHP-DEV] Closures and $this: Please vote! From: mike@rile.ca ("Mike Robinson") Christian Seiler wrote > > Hi Lukas, > > > Call for a vote. This time around people cannot claim to not have had > > time to review the issue. Also back then we tried to play it safe > > because of the short time before we were to release. This time there > is > > more time for this to mature if needed inside svn. > > Ok, so then I call for a vote. Again, here are the options: > > (0): No $this in closures, keep it that way. (keep PHP 5.3 behavior) > > (A): Original closures implementation: > $this is always the object context at > closure creation. No possibility to do > $someObject->closureProperty(...) and thus > no possibility to extend objects! > > (C): Javascript-like behaviour: Bind $this only when calling > the closure as object method, else $this is undefined. > > (D): JS-like behaviour on top of (A). > Please look at the RFC as to why I consider it to be a > *REALLY*, *REALLY* bad idea. > > (A+): (A) + Closure::bind & Closure->bindTo for rebinding > if this is wanted & the possibility to call a closure as an > object > method. (See last section of RFC for details) > > My vote: (A+) > > Regards, > Christian FWIW, another non-internal-dev vote for (A+). Best Regards Mike Robinson