Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81979 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99673 invoked from network); 5 Feb 2015 23:47:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2015 23:47:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.200 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.200 imap1-2.ox.privateemail.com Received: from [192.64.116.200] ([192.64.116.200:39456] helo=imap1-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 21/93-17766-B2104D45 for ; Thu, 05 Feb 2015 18:47:56 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 01E03B0008E; Thu, 5 Feb 2015 18:47:53 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap1.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap1.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id aHbXm_6EDzUT; Thu, 5 Feb 2015 18:47:52 -0500 (EST) Received: from oa-res-26-240.wireless.abdn.ac.uk (oa-res-26-240.wireless.abdn.ac.uk [137.50.26.240]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 5E512B0008B; Thu, 5 Feb 2015 18:47:52 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) In-Reply-To: Date: Thu, 5 Feb 2015 23:47:49 +0000 Cc: PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <8703B53E-2C4A-4AC6-95C4-D4F19C6D5221@ajf.me> To: Andi Gutmans X-Mailer: Apple Mail (2.2070.6) Subject: Re: [PHP-DEV] [VOTE] Scalar Type Hints From: ajf@ajf.me (Andrea Faulds) Hi Andi, > On 5 Feb 2015, at 23:22, Andi Gutmans wrote: >=20 > I have to say I=E2=80=99m pretty disappointed at the opening of the = vote.=20 > We had a pretty good RFC (thank you) for weak type hinting which was = aligned with the spirit of PHP and everyone was able to rally around it. This is far from true. Some people on internals were happy, but only = some, and everywhere outside internals I looked, the reception was far = more negative. > This has now been morphed into something very hard to swallow and IMO = having such a declare(=E2=80=A6) syntax will be ridiculed by the broader = app dev community until the end of time=E2=80=A6 Nobody mocks Perl or JS for use strict. > But even that syntax aside (it=E2=80=99s only syntax after all), I = think we lost the ability to reach consensus on something so important = to everyone which we haven=E2=80=99t been able to come to agreement on = for over 10 years. Finally it was there, in reach and you made a 180 = degree turn. =E2=80=9CConsensus=E2=80=9D is exaggerated. There was no consensus and = to claim there was is to ignore the reality that the PHP community is = divided over this issue. I=E2=80=99d love to say that everyone loves = weak type hints and if that version had passed we=E2=80=99d all be = dancing around happy holding hands, but the reception was not uniformly = positive, not even close, and that=E2=80=99s just on internals. > I think it=E2=80=99d be so much easier for us to implement weak type = hinting. Have everyone rally around it. Be happy and then learn and see = whether an additional mechanism is really necessary. Who=E2=80=99d be happy? I realise you and Zeev are big fans of weak = types, as are many others, but there are also a lot of PHP developers = who vehemently disagree with you. > We could even add an E_STRICT_TYPES error_reporting flag to help folks = =E2=80=9Cdebug=E2=80=9D their code if they so wish to see if there are = any hotspots in their code they may want to take a look at - again not = necessarily an error but maybe a debugging tool. Global error handlers affect all code the interpreter runs, which is why = we=E2=80=99ve looked down on them in recent times. > But net, net - why not just implement the thing everyone can agree on. Everyone doesn=E2=80=99t agree on it. If everyone did agree on it, v0.1 of the RFC would have been the one = that went to vote. > Have something really good in the spirit of the PHP Language for PHP 7 = and learn how people leverage that=E2=80=A6 The reality is that for the = majority of the Web community =E2=80=9C1=E2=80=9D coming in from HTTP = should be accepted as a 1. Period. It=E2=80=99s very well and good you claiming that the =E2=80=9Cmajority=E2= =80=9D agree, but this does not match my experiences. The PHP community = is not a single, homogenous entity. It is very difficult to judge. > I voted =E2=80=9Cno=E2=80=9D but I will vote =E2=80=9Cyes=E2=80=9D for = the competing RFC which is 80% of your RFC. Why are we not given that = option?????? Because I cannot in good conscience push through something in the name = of =E2=80=9Cconsensus=E2=80=9D which does not even approach it. -- Andrea Faulds http://ajf.me/