Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91488 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32977 invoked from network); 3 Mar 2016 17:16:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Mar 2016 17:16:12 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.44 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.44 mail-wm0-f44.google.com Received: from [74.125.82.44] ([74.125.82.44:36431] helo=mail-wm0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D6/44-08749-C5178D65 for ; Thu, 03 Mar 2016 12:16:12 -0500 Received: by mail-wm0-f44.google.com with SMTP id n186so141421420wmn.1 for ; Thu, 03 Mar 2016 09:16:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=6jZY2Hh6aLR4f7TGpu4iH09E507E+p91khejNsXysw0=; b=yFWkmZE9pQks7boWtxxh4F5rmJ0WfFkYViYF8mvf4RfhgeDoz736ofbzzxCdYPbjXS JOn40JFdGuzybCi3nF9CtKmAvDgaRwnHbM+bOtU29c8Mm6aNGYv7aydcwdhBQLvO3+aE 14d3uGy4NmTMaxvMJk/LWyILmpkxKR4MaDn5E26dgVfOGrZTUeKpi5qKOgzdu5L7PlRm y8vkRoi242m0W5thilcanOvzzaxqAG8at38bp6d0QXvUSRhr8l6BiFD6ZBO5r0+aN5tY bzdQDivYlcpMwExhYUiToOEqM7pVYhcCL48Lc6/mPGv8TMHljzC0An9x+E20h8sVw+TK ry0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=6jZY2Hh6aLR4f7TGpu4iH09E507E+p91khejNsXysw0=; b=Vh7Wgfainxp/p5wdQ0GXl8QvpvPIJ/CvWoelrReDUK4nUrw5Inv79jr7FfWZ8smuwU o/R4xPPE2mLHhTKIKRq9fcfdKrkTO3s309j9r0gJS+CT0ZmKNIkYY67l59bSrQ1NQmnF H/LXI5ncV2rUGiclaZZ2yoA1jEaCtWJcHS/8HAkiOlkptufptDbbn8DQzMaBPzL8BJtN l6kQ6myIojNdcZ/LATiYU/oTwkrtZwP7BCBFNUfmEvwubOjZMBn2apnmntepkAIahk5t zBbZgMGKvWSIW6NdpOX4mMBH7biGiSRNLOFE+4vEeofdvhD/mnNj73J4KGh/QcYTh6O0 sx4A== X-Gm-Message-State: AD7BkJKmaymttT65//vT5/LehiQhKwPQleu4VqxekArJfykckF5aTuuol+BxxBMhWGXKow== X-Received: by 10.28.137.139 with SMTP id l133mr200328wmd.1.1457025369651; Thu, 03 Mar 2016 09:16:09 -0800 (PST) Received: from [192.168.0.141] ([93.188.182.58]) by smtp.googlemail.com with ESMTPSA id 198sm9931914wml.22.2016.03.03.09.16.08 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Mar 2016 09:16:08 -0800 (PST) To: internals@lists.php.net References: <1F.91.55238.41F10D65@pb1.pair.com> <56D42CD3.6020602@gmail.com> <56D57DF4.8000906@gmail.com> <56D5D2AD.6070805@gmail.com> <56D5DDA6.4080607@fleshgrinder.com> <40.73.36499.548B6D65@pb1.pair.com> <56D6BBD0.5010505@gmail.com> <56D73386.3000903@fleshgrinder.com> <86.68.21983.A2508D65@pb1.pair.com> <56D86C00.6000904@fleshgrinder.com> Message-ID: <56D870FC.80205@gmail.com> Date: Thu, 3 Mar 2016 17:14:36 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56D86C00.6000904@fleshgrinder.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC Proposal] var keyword deprecation/removal From: rowan.collins@gmail.com (Rowan Collins) Fleshgrinder wrote on 03/03/2016 16:53: > The fact that > there are no plans regarding the old syntax and thus keeping the > duplication indefinitely is the actual problem. Having no plans to use something doesn't make it a problem. There still needs to be some actual problem you are solving by removing it. >> It occurs to me that if I saw "var", I would not think "that should be >> >public", but "that needs assessing for visibility". I do the same with >> >legacy code where methods are written as "function foo()" rather than >> >"public function foo()" - I check whether it should actually be >> >public, and also in that case whether it should be static. > It seems as if this is not the issue for the people who are against > removing the "var" keyword from PHP 8. They simply do not want to change > their scripts at all. The described procedure is truly time consuming > since it involves to check all usages everywhere as well. Simply > changing from "var" or "public" to any other visibility is a brutal change. Let's not make generalisations about people's motives here. I am expressing *my* reasoning for being against removal; others may have other reasons, and you can discuss those with them. My point was that bulk changing "var" to "public" is a counter-productive change. It removes the information "this property's visibility has not been reviewed", without actually adding any value. This leaves us with a small gain (clearer to new users that the correct keyword is "public"), and two small costs (the need to run a script over all existing code to change "var" to "public", and the loss of opportunity to manually review all instances of "var"); I'm not willing to quantify those, but the balance doesn't feel in favour of change to me. If there were some way of preventing users writing var in *new* code, I would be all for it - there is no advantage to doing so, and it adds no value to have two ways of writing "public". But there is no way for the engine to distinguish new code from "legacy" code which already contains the keyword. If someone can come up with a clean mechanism for doing that (and in particular, for new code to say "I'm including this legacy library which I will replace with modern code shortly, don't bother telling me how many deprecated features it uses"), then I would be very interested. Regards, -- Rowan Collins [IMSoP]