Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92287 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10117 invoked from network); 14 Apr 2016 09:44:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Apr 2016 09:44:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=addw@phcomp.co.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=addw@phcomp.co.uk; sender-id=permerror Received-SPF: pass (pb1.pair.com: domain phcomp.co.uk designates 78.32.209.33 as permitted sender) X-PHP-List-Original-Sender: addw@phcomp.co.uk X-Host-Fingerprint: 78.32.209.33 freshmint.phcomp.co.uk Received: from [78.32.209.33] ([78.32.209.33:40359] helo=mint.phcomp.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/D5-12455-B866F075 for ; Thu, 14 Apr 2016 05:44:44 -0400 Received: from addw by mint.phcomp.co.uk with local (Exim 4.84_2) (envelope-from ) id 1aqdpI-0002M2-KB for internals@lists.php.net; Thu, 14 Apr 2016 10:44:40 +0100 Date: Thu, 14 Apr 2016 10:44:40 +0100 To: internals@lists.php.net Message-ID: <20160414094440.GF19347@phcomp.co.uk> Mail-Followup-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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <6F.C3.12455.94C5F075@pb1.pair.com> Organization: Parliament Hill Computers Ltd User-Agent: Mutt/1.5.20 (2009-12-10) Subject: Re: [PHP-DEV] Re: Improving PHP's type system From: addw@phcomp.co.uk (Alain Williams) On Thu, Apr 14, 2016 at 10:00:41AM +0100, Tony Marston wrote: > I agree with Zeev 100%. 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. The aim of any language should be to > enable programmers to do complicated things in a simple way, and not > to do simple things in a complicated way. I disagree. My way of looking at it is that adding some features(eg the current type specification/checking) adds to the simplicity because I can say what types I want and don't need to write code to check the types of argument received by a function (etc). Why would I want to check: because I value robustness, ie not having my code fall over because, somehow, a wrong type slips by unnoticed. Does that make quick/simple programming not possible in PHP ? No: I will put the most of the robustness work into libraries/classes that I write and want to reuse - the simple programs that use them don't necessarily be written to the same standard. > I have been programming for over 30 years, so in no way can I be > classed as a newbie. PHP is my favourite language because of its > simplicity. I started with PHP 4, and although I have upgraded to > PHP 5 I refuse to use any of the "clever" additions which have been > made to PHP 5 simply because I can achieve what I need to achieve > WITHOUT using any of those additions. > > I will not be making use of any changes that are made to the > language in order to handle typed variables for the simple reason > that PHP was specifically designed to be an untyped language, and in > the 13+ years that I have been programming with PHP I have found > that to be more of an advantage than a hindrance. Type juggling is useful, but somewhere you do need to check your input. I doubt that we will agree, but we don't need to: we prob have different aims and goals. There is no reason that PHP cannot satisfy both of us. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include