Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91430 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72371 invoked from network); 26 Feb 2016 09:47:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Feb 2016 09:47:01 -0000 X-Host-Fingerprint: 80.177.120.119 marston-home.demon.co.uk Received: from [80.177.120.119] ([80.177.120.119:1292] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1F/91-55238-41F10D65 for ; Fri, 26 Feb 2016 04:47:01 -0500 Message-ID: <1F.91.55238.41F10D65@pb1.pair.com> To: internals@lists.php.net Date: Fri, 26 Feb 2016 09:46:52 -0000 Lines: 2 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3564.1216 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3564.1216 X-Posted-By: 80.177.120.119 Subject: Re: [PHP-DEV] [RFC Proposal] var keyword deprecation/removal From: TonyMarston@hotmail.com ("Tony Marston") Sent: Thursday, February 25, 2016 12:58 PM >To: Tony Marston >Subject: Re: [PHP-DEV] [RFC Proposal] var keyword deprecation/removal >Hi Tony, > >Thank you so much for your feedback. You make some really good, valid >points. If I may provide some responses to some of them: > >> Where is your proof? You say "not used by a major part of the community" >> which means that it is still being used by a minor part, but exactly how >> "minor"? > >I downloaded and scanned the top 10,000 projects on Packagist (including >their dependencies). So you examined a bunch of source files in one location? What about those projects that aren't maintained on Packagist? Mine certainly isn't. >Only 4% use "var". I looked closer into that 4% and found almost 2/3rds >were due to a handful of prominent packages being required as dependencies. >Adjusting these packages would drastically lower overall usage across the >ecosystem. And because "var" is simply an alias for "public", making that >change would only require a bump in the patch version. > >I'm not 100% happy with my methodology because the dependencies are counted >multiple times. When I have some time I'll revise my approach to get >more-accurate figures. The only way to obtain what could be called "accurate" figures would be to examine every PHP script ever written. What you have is nothing more than a small sample. >> it would take effort to take it out... > > >Here's a simple PHP script which does this automatically: >https://gist.github.com/colinodell/5fb5e5d474674f294a38 Because "public" >is supported in 5.x and 7.x, programmers could run this script at any time >before the 8.0 release (assuming this proposed RFC passes and the >programmer wants their code to run on 8.0). > >> ...and amend the documentation > > >I will happily make that change myself. > > >> while programmers expect new features to be added they do NOT expect old >> features >> to disappear. Once a piece of code has been written and has proved to >> work >> as designed it is expected to work with all future versions. > > >I'm hoping that the automated upgrade script and advance warning would help >mitigate that impact. I, and others, will object to having to run any sort of conversion scripts just because you personally don't like the "var" keyword. It does no harm, so there is no benefit to be had by taking it out. -- Tony Marston