Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92363 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37862 invoked from network); 16 Apr 2016 09:05:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2016 09:05:04 -0000 X-Host-Fingerprint: 80.177.120.119 marston-home.demon.co.uk Received: from [80.177.120.119] ([80.177.120.119:9008] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9E/60-32052-E3002175 for ; Sat, 16 Apr 2016 05:05:04 -0400 Message-ID: <9E.60.32052.E3002175@pb1.pair.com> To: internals@lists.php.net References: <570E99AC.3090804@fleshgrinder.com><570EA5EB.8090501@fleshgrinder.com><570EAB0D.6080706@gmail.com><570EB67E.8010908@garfieldtech.com><5B147E88-CC0A-4CBC-A49D-C7FE3BF557C0@zend.com><6F.C3.12455.94C5F075@pb1.pair.com> In-Reply-To: Date: Sat, 16 Apr 2016 10:04:45 +0100 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] Re: Improving PHP's type system From: TonyMarston@hotmail.com ("Tony Marston") "Marco Pivetta" wrote in message news:CADyq6sJfPYgQvhQt=UvCBqkooJjoUPCz1sUfzwXc+55hL0PpzA@mail.gmail.com... > >Tony, that sounds really like "real programmers use `dd -if -of`". Please >stop with that argument, as it really doesn't reflect reality. That is not what I said. As a follower of the KISS principle I believe that good programmers write simple code that anyone can understand, while less-than-good programmers write complex code that only a select few can understand. The problem with adding all these new and shiny features to the language is that it makes the language more complicated, especially when it comes to all those edge cases which keep arising. Changes like this are making the language more complicated by getting it to do in core what used to be done in userland code. All that is happening is that it becomes more complicated to update the language for genuine improvements which would be appreciated by the masses instead of these over-complications which are only for the benefit of the few who think programming should be restricted to those who have Phd's. > I keep >enhancing my software with new (stricter) type checking, when available. >For example, I'm eager to replace current docblocks declaring `void` >methods with the upcoming hint (7.1), and every time I add hints and type >strictness I find new hidden bugs on an already well-tested code (with 100% >coverage and mutation testing). These bugs are legit, they are just waiting >to happen. That just proves that your unit testing did not in fact have 100% coverage. If a potential bug hasn't been encountered by a real user then it doesn't actually cause a problem, and if it doesn't cause a problem then why does it need a solution? Even Microsoft, the largest software company in the world, does not attempt to fix every possible bug only those bugs which cause problems. >Additionally, I would also love to get rid of docblocks for type-systems: >they are unreliable, hard to reflect and enforce nothing, which allows lazy >and sloppy programmers to just circumvent specifications as it best pleases >their mood, rather than the requirements. > >Yes, I'm a real programmer too, and no, I don't use cosmic rays to write >code to my computer's hard drive, give it a rest. >On Apr 15, 2016 08:09, "Tony Marston" wrote: > >> "Levi Morrison" wrote in message >> news:CAFMT4Nr4GmnBBsOfydF5sLOtaEo1rZZiPdGdV8v6y+Z-6PVCOg@mail.gmail.com... >> >>> >>> There are too many people out there who are trying to make the language >>>> more complicated than it need be just to prove how clever they are. >>>> >>> >>> I can assure you I am not proposing these RFCs to show how clever I am. >>> >> >> If millions of programmers have written millions of lines of code to >> write >> effective programs WITHOUT the use of type hinting/enforcement, then how >> come there are some people out there who keep saying that PHP is a bad >> language because it does not have type checking? Those who cannot write >> effective software without these "clever" additions to the language are >> doing nothing but announcing to the world that they are not clever enough >> to write effective software using their own limited abilities. >> >> -- >> Tony Marston >> >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> -- Tony Marston