Re: [RFC Proposal] var keyword deprecation/removal
| From: | Johannes Schlüter | Date: | Thu, 03 Mar 2016 14:08:30 +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-91483@lists.php.net to get a copy of this message | ||
On Wed, 2016-03-02 at 19:40 +0100, Fleshgrinder wrote:
> 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.
Yes, duplication isn't good and we should avoid adding new duplication
without a good reason.
However breaking compatibility isn't good either. Adding breaks not only
invalidates code but also tutorials, books, etc. which might confuse
readers more (while I admit, that a book teaching "var" might be
questionable in other ways, too)
Quick Googling brings this tutorial, which first teaches "var"
to get started and then changes to public/private/protected in a
later step:
http://www.killerphp.com/tutorials/php-objects-page-3/
> 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.
One could argue those were other times - I doubt anybody maintains a
single code base for both PHP 4 and PHP 7. While in early PHP 5 times it
had been common that people tried to produce code working on PHP 4 and
PHP 5 without notices.
johannes
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc