Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46438 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37221 invoked from network); 15 Dec 2009 23:50:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Dec 2009 23:50:26 -0000 Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=rquadling@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.220.227 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 209.85.220.227 mail-fx0-f227.google.com Received: from [209.85.220.227] ([209.85.220.227:36915] helo=mail-fx0-f227.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1F/30-33900-EB0282B4 for ; Tue, 15 Dec 2009 18:50:23 -0500 Received: by fxm27 with SMTP id 27so462366fxm.23 for ; Tue, 15 Dec 2009 15:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=CZO2lwVyQA8DqvcUQ154Uh9kz7l44oZyMry+jpJmoOQ=; b=eCl48acFWu4fLiyqyTrjpcHt27YDxrisspj+vC7yfU9Wdz0bEGWQWCC22UohUtLjpe 9IK+6jvF+OSUelKt1D+DcpbnUx5yJTgUHNvsg6gaFIWphas2Ptq+F+5G24ghrBhQ9Bzk QBu4UdiXKjLYFrLiwYs2UKAnHt5GNlfM25phY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:content-type:content-transfer-encoding; b=Wfdm7uawj9XZGIZKTFL12cZSEmBbpL7Mc8Xeu1rHfukRHQsmMoy+UCN31kCblVEiE3 tvUSn0DS2Q1jZ853GCAuarW3aJuqXn/rQc2vFlmV9tySWH8P7eaxhKf4UlbNX/fDChm6 iEuvrPYoEsQ4iyCs7s2soIIpYL8Cudj4XhbOs= MIME-Version: 1.0 Received: by 10.223.27.79 with SMTP id h15mr308601fac.23.1260921019564; Tue, 15 Dec 2009 15:50:19 -0800 (PST) Reply-To: RQuadling@googlemail.com In-Reply-To: <4B2812B6.5000305@gmail.com> References: <4B01A4C2.8030602@gmx.net> <4B27DD0B.1070303@gmx.net> <6571303B-82D2-43E4-8550-E2B9420BA241@pooteeweet.org> <4B27E7A4.6030503@gmx.net> <4B2812B6.5000305@gmail.com> Date: Tue, 15 Dec 2009 23:48:18 +0000 Message-ID: <10845a340912151548n673c4eb3n4c164d35c48ffef2@mail.gmail.com> To: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Closures and $this: Please vote! From: rquadling@googlemail.com (Richard Quadling) 2009/12/15 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: >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$this is always the object context at >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0closure creation. No possibility to do >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$someObject->closureProperty(...) and = thus >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0no possibility to extend objects! >> >> (C): Javascript-like behaviour: Bind $this only when calling >> =C2=A0 =C2=A0 =C2=A0the closure as object method, else $this is undefine= d. >> >> (D): JS-like behaviour on top of (A). >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Please look at the RFC as to why I con= sider it to be a >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*REALLY*, *REALLY* bad idea. >> >> (A+): (A) + Closure::bind& =C2=A0Closure->bindTo for rebinding >> =C2=A0 =C2=A0 =C2=A0 if this is wanted& =C2=A0the possibility to call a = closure as an object >> =C2=A0 =C2=A0 =C2=A0 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 =C2=A0| =C2=A0http://blog.igstan.ro/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > (A+) +1 from a non internals voter. --=20 ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html Zend Certified Engineer : http://zend.com/zce.php?c=3DZEND002498&r=3D213474= 731 ZOPA : http://uk.zopa.com/member/RQuadling