Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82807 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59941 invoked from network); 16 Feb 2015 10:29:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Feb 2015 10:29:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.178 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.178 mail-we0-f178.google.com Received: from [74.125.82.178] ([74.125.82.178:42220] helo=mail-we0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/FC-05176-B76C1E45 for ; Mon, 16 Feb 2015 05:29:15 -0500 Received: by mail-we0-f178.google.com with SMTP id w62so28257878wes.9 for ; Mon, 16 Feb 2015 02:29:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=VM/2iIS6UKKA4BJl+hV/9a//1/bSDU/K3ORVraxg6RY=; b=oaT2laipynnzk8t0Ul/E49yc2iMG2GAL21eg8ZET3k8SzvW/CFa68xFUS5ICk1w/A9 8AmhztIH1AKIgy5yGhdMCNXD0p0aH4bbzFSQMEt8pCBUOEnanlTrhjEWKtmNX9B6MmaX 8DcC/DfZUTHlJhreHz0426KHaLMc+GQa0twBqPHiIpF6E4jpLEWIs4QVN5sS2wGA50vj gtWeA2505bbCuuS5hc41dPvRj6ER7vl6X6FJys7crdFZyFpJ4e39yAFYEUiB3dT5Vn8X hKB7+l7OmgV3h7g0x4+/s8vTYfTpcJ8y9vSsWHqOP8ydK0iZQvJ5dhBcapRrOnv/HhDV LjHg== X-Received: by 10.180.84.100 with SMTP id x4mr35357960wiy.89.1424082551328; Mon, 16 Feb 2015 02:29:11 -0800 (PST) Received: from [192.168.0.172] ([62.189.198.114]) by mx.google.com with ESMTPSA id et4sm22206660wjd.15.2015.02.16.02.29.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Feb 2015 02:29:10 -0800 (PST) Message-ID: <54E1C630.9010408@gmail.com> Date: Mon, 16 Feb 2015 10:28:00 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: internals@lists.php.net References: <54DD1BB1.1090501@gmail.com> <54DD815F.70504@mabe.berlin> <54DD8AA9.3040808@gmail.com> <752856272.5008.1423809953291.JavaMail.open-xchange@app07.ox.hosteurope.de> <54DDAC30.7090206@gmail.com> <54DFAA20.4000900@mabe.berlin> <0C346B4A-94E7-4865-9698-044F21FDBC5F@gmail.com> <54E0F45A.6060208@mabe.berlin> <54E0F7F9.2060406@gmail.com> <54E17CAC.2070403@gmail.com> In-Reply-To: <54E17CAC.2070403@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Remove $this from incompatible context From: rowan.collins@gmail.com (Rowan Collins) Stanislav Malyshev wrote on 16/02/2015 05:14: > Hi! > >> Agreed. Personally, I'm a great fan of symettry, so part of me would >> prefer to introduce a keyword for when you *can't* call a method >> statically, e.g. "instance function foo() { ... }". But I guess instance > This would be another form of saying "foo() method uses $this", but if > that's true then once it uses $this you'd get the error anyway, so not > much changes from adding "instance". > Well, no, it would mean "you cannot call this method statically, even if it doesn't use $this", i.e. the same meaning proposed for any method that omits the keyword "static". By your reasoning, you could say that adding "static" just means "foo() method doesn't use $this". The point is that you're making an explicit choice one way or another, and the version with neither annotation remains ambiguous. Regards, -- Rowan Collins [IMSoP]