Re: [RFC Proposal] var keyword deprecation/removal
| From: | Rowan Collins | Date: | Wed, 02 Mar 2016 10:09:20 +0000 |
| Subject: | Re: [RFC Proposal] var keyword deprecation/removal | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-91474@lists.php.net to get a copy of this message | ||
Tony Marston wrote on 02/03/2016 09:53:
wrote in message news:56D5DDA6.4080607@fleshgrinder.com...I think the point was that *the difference between* "var" and "public" was being abused, which wouldn't be possible if there were only one keyword. However, I agree that it's a very weak argument for removal (just as "I [ab]use 'var' to mean something different from 'public'" is a weak argument against removal). Regards, -- Rowan Collins [IMSoP]On 3/1/2016 6:34 PM, Rowan Collins wrote:Just because one developer out of millions made a mistake is no reason to punish those millions. If "var" can be abused then "public" can be abused in the same way, so surely the only way to avoid the possibility of ANY abuse whatsoever would be to remove "public" as well as "var".Rowan Collins wrote on 01/03/2016 11:33:The misuse of "var" as it was explained is reason alone to take action.Secondly, violating visibility may have repercussions outside actual errors.Incidentally, PHP itself encountered this a few years ago, where a release of libxml2 changed internal behaviour that was being relied on for a hack. The result was that entities like > started silently disappearing from everyone's parsed XML if they compiled PHP against the new library. See https://bugs.php.net/bug.php?id=45996 and http://thread.gmane.org/gmane.comp.gnome.lib.xml.general/14610 Regards,