Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91391 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45021 invoked from network); 25 Feb 2016 09:26:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Feb 2016 09:26:27 -0000 X-Host-Fingerprint: 80.177.120.119 marston-home.demon.co.uk Received: from [80.177.120.119] ([80.177.120.119:19152] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 74/A1-29886-2C8CEC65 for ; Thu, 25 Feb 2016 04:26:27 -0500 Message-ID: <74.A1.29886.2C8CEC65@pb1.pair.com> To: internals@lists.php.net References: <56C77575.4090906@fleshgrinder.com> <56C77FC8.1070500@gmail.com> <56C78496.9020804@fleshgrinder.com> <56CB6BA7.8060500@gmail.com> <56CDEB49.5040006@fleshgrinder.com> In-Reply-To: <56CDEB49.5040006@fleshgrinder.com> Date: Thu, 25 Feb 2016 09:26:20 -0000 Lines: 7 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; 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") wrote in message news:56CDEB49.5040006@fleshgrinder.com... > >On 2/22/2016 9:12 PM, Stanislav Malyshev wrote: >> Hi! > >Hey there. :) > >On 2/22/2016 9:12 PM, Stanislav Malyshev wrote: >>> Old cellphones were shipped with a user manual that contained precise >>> instructions on how to deal with the installed OS. >> >> You don't really need a whole manual to know two things are the same. >> You only need one line from that manual. It's a minimal effort, well >> within expected of what may be required of a person learning new >> language - I think reading a couple of lines is not excessive. >> >>> New smartphones do not contain a user manual because the OS is so >>> intuitive that nobody has a need for them. >> >> Or so the marketing team would love us to believe ;) >> If you think a programming language somehow can be so "intuitive" that >> you never need to actually know anything to use it - you're in for a >> somewhat unpleasant surprise, unfortunately. We can make learning it >> easi-er - and having aliases is part of it - but we can never make it so >> easy as never having to actually touch the manual or any other learning >> media. > >My example seems to be bad or to abstract. I am not thinking that a >programming language can become that intuitive; the contrary. >Programming languages are already so complicated that it is harmful to >start littering them with thousands of ways to achieve one thing. It >also makes users uncertain when the manual entry says that something is >an alias. They fear that it might be removed. That fear is unjustified. They need to learn the difference between "duplicated" and "deprecated". Unless a function is marked as "deprecated" it cannot be removed. >They create project rules that forbid the usage of aliases ... We cannot stop stupid people from creating stupid rules. >Science shows that it is harmful, let's clean it up! Your "proof" is not scientific, it is just personal opinion. There is no evidence that use of the "var" keyword is harmful in any way. >>> discussion because you simply say no and do not even allow a >> >> That is not correct. I say no with substantiation - namely, that >> removing aliases would cause code breakage and would not add anything to >> actual functionality. Your argument seems to be generic "redundancy is >> bad" argument, and treating somebody asking questions on stackoverflow >> as evidence that we have a problem. Both are wrong - redudancy can be >> both good and bad, and in our case I think it is good because it lets >> people continue to rely on their previous experience both in PHP and >> other languages. Also, somebody asking questions is not a reason to >> change the language - there always will be people asking questions, and >> that's fine as long as we have good easily accessible answers, which we >> do. > >In Germany we say "jain" (yes and no). You are right that you brought up >that argument and I acknowledged it but put it like you did not bring up >one in my last message. I am sorry for that. You are not right that >Stackoverflow is my only argument. I provided scientific proof that >those aliases harm the design of a language and a more general proof in >regards to usability and duplication. Again, your "proof" is NOT scientific, it is merely a personal opinion. >People often rely on side effects but that does not mean that this is a >good practice. We are talking here about a feature that was added in PHP >4 in order to support OO coding. The feature is not used anymore by a >major part of the community and it is considered best practice to use 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 don't see why I should be forced to make a totally unnecessary change to vast numbers of my scripts just to fall in line with your personal opinions. >the proper access modifiers (namely public in this case). We are talking >about a future version of PHP (probably 8) and not about removing it >from PHP 4, 5, nor 7. There is no reason to remove it from ANY version of PHP. It does no harm, it would take effort to take it out and amend the documentation, but for what benefit? >There is only one constant in life and that is change. Insisting on not >changing means to stop; especially in a context of software development >and engineering (which actually implies constant change in its own name). Change for change's sake is never a good idea. I have been developing in several languages for 40 years, and I can tell you point blank that 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. The only exception to this is to plug holes in security. This is called "forwards compatibility", and was a major selling point of all my previous languages. If developers fear that they will have to rewrite huge swathes of code each time a new version is released they will quickly give up and move to a "professional" language which offers long term stability. -- Tony Marston