Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46436 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30319 invoked from network); 15 Dec 2009 22:50:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Dec 2009 22:50:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=ionut.g.stan@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ionut.g.stan@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.154 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: ionut.g.stan@gmail.com X-Host-Fingerprint: 72.14.220.154 fg-out-1718.google.com Received: from [72.14.220.154] ([72.14.220.154:23263] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/09-16228-4B2182B4 for ; Tue, 15 Dec 2009 17:50:29 -0500 Received: by fg-out-1718.google.com with SMTP id 19so1573418fgg.11 for ; Tue, 15 Dec 2009 14:50:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=dHeuoGTylkBXYtL17vlB/H1icEl9JiPOle5VIY0Hm+8=; b=cKj22+MRE4VAy2Ou9DsyDcqSMfAdv7oo6ouzjFHsE4YL/IvBUSQlrSl7tFPd3gThmS J1qPCEyQBCU5OFQ+QU8yCUD1L0uPVY0u6ElbG4ueA26jNTxqfwWV0MubRoQwn07EvurO 2U9lB7NSYKJhpFuUY4XJO5myaWGS5eN3GtohA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=Tl3p4uxFsnoOePEqZnJXF9gCvwFmln+vvjW0G85gHl0+7nqx8vvwCHwPTE+Ceb0i4B rzvR/hyKbKKgnovAg00HUPYZ8bEbrjccefRH+Ml2ef0YVKBX2rcZa5nbYEp7swqhKvjd +0Tbb2KKsTcRUEUZVJQnevYvcjLsMpfJGra7E= Received: by 10.87.73.4 with SMTP id a4mr301720fgl.76.1260917425213; Tue, 15 Dec 2009 14:50:25 -0800 (PST) Received: from ?89.36.11.207? ([89.36.11.207]) by mx.google.com with ESMTPS id 3sm9775151fge.0.2009.12.15.14.50.23 (version=SSLv3 cipher=RC4-MD5); Tue, 15 Dec 2009 14:50:24 -0800 (PST) Message-ID: <4B2812B6.5000305@gmail.com> Date: Wed, 16 Dec 2009 00:50:30 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: internals@lists.php.net 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> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Closures and $this: Please vote! From: ionut.g.stan@gmail.com ("Ionut G. Stan") A+, but I'm not an internal dev. On 12/15/2009 21:46, 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 > > PS: Note that I removed (B) from the possible options since I believe it > to be an EXTREMELY bad idea if one thinks it through. It was only added > to the RFC in order to give an overview over what was discussed > previously. Unless someone can make an extremely compelling case why I'm > wrong in this respect, I will refuse to implement (B). > -- Ionut G. Stan I'm under construction | http://blog.igstan.ro/