Re: [RFC Proposal] var keyword deprecation/removal
| From: | Tony Marston | Date: | Thu, 03 Mar 2016 09:34:20 +0000 |
| Subject: | Re: [RFC Proposal] var keyword deprecation/removal | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-91477@lists.php.net to get a copy of this message | ||
wrote in message news:56D73386.3000903@fleshgrinder.com...
On 3/2/2016 11:09 AM, Rowan Collins wrote:Only some people are confused. But that confusion goes away once they RTFM (Read The Friendly Manual). If you want to avoid such confusion over alias names then surely that would be an argument against introducing aliases in the first place. In this case the short array syntax would never have been introduced as the (only slightly longer) long array syntax had already existed since day #1.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,It showcases what the studies about UI/UX found out about duplicated behavior (or call it aliasing, multiple choices for the same thing, ...). People are confused and we can and should avoid that.
The "var" keyword once emitted an E_STRICT but I guess it was turned off again because too many people were complaining as they are now.So if people are still using it then surely that is an argument AGAINST its removal. -- Tony Marston