Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82599 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87026 invoked from network); 13 Feb 2015 11:13:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Feb 2015 11:13:23 -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:54341] helo=imap1-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AD/B4-62214-15CDDD45 for ; Fri, 13 Feb 2015 06:13:22 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 9D16CB000A4; Fri, 13 Feb 2015 06:13:18 -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 GCfb25qjWOjH; Fri, 13 Feb 2015 06:13:18 -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 E282DB00091; Fri, 13 Feb 2015 06:13:17 -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: Fri, 13 Feb 2015 11:13:10 +0000 Cc: PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: References: To: Patrick ALLAERT X-Mailer: Apple Mail (2.2070.6) Subject: Re: [PHP-DEV] [VOTE] Scalar Type Hints From: ajf@ajf.me (Andrea Faulds) Hi, > On 13 Feb 2015, at 09:37, Patrick ALLAERT = wrote: >=20 > Voted "no" because of the reasons already mentioned by a bunch of = others here. >=20 > Weak type hint as presented earlier: +1 (and very good job Andrea = about that!). > declare(strict_types=3D1): -1, not only about the syntax, but also = about the mixed mode it introduces. >=20 > I'm pretty confident that this RFC will "pass" with just above 2/3 of = majority while it could reach much more. >=20 > I am pretty sure that if this RFC doesn't include a strict type mode = _the way it is proposed_ (or even, not at all, as part of another = related RFC), it would have some "no" converted to "yes" and would have = a wider adoption, which is for sure a better option than relying on a = voting mechanism which still is a supporting tool, we're not politicians = after all :) It wouldn=E2=80=99t have wider adoption. Excluding a large portion of = the PHP community (which favours strict types) and giving them something = which doesn=E2=80=99t work for their use cases (weak types) is not going = to win any fans. > Andi's suggestion about an E_STRICT_TYPES sounds very reasonable and = much more in line with how PHP deals with "errors=E2=80=9D. I don=E2=80=99t think E_STRICT_TYPES is a good idea. Global error = handlers are, well, global. They not only affect your own code, but = everything within the request, including libraries you use. So you can = use them (and break every library you use), or not use them (and now = it=E2=80=99s useless). What this RFC does is let individual files choose one mode or the other. = This is far better for interoperability. Thanks. -- Andrea Faulds http://ajf.me/