Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81105 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32576 invoked from network); 25 Jan 2015 04:02:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jan 2015 04:02:57 -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.216 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.216 imap10-3.ox.privateemail.com Received: from [192.64.116.216] ([192.64.116.216:57925] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6C/23-11456-CEA64C45 for ; Sat, 24 Jan 2015 23:02:55 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id ED6DF2400AA for ; Sat, 24 Jan 2015 23:02:49 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap10.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap10.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ZBLTMWo6Bbja for ; Sat, 24 Jan 2015 23:02:49 -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 757202400A9 for ; Sat, 24 Jan 2015 23:02:49 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: <41D5BB0B-73AF-488E-968D-90B2878E3178@ajf.me> Date: Sun, 25 Jan 2015 04:02:46 +0000 Content-Transfer-Encoding: quoted-printable Message-ID: <90B1885A-E767-484E-8F38-A791E8A3FE9B@ajf.me> References: <41D5BB0B-73AF-488E-968D-90B2878E3178@ajf.me> To: PHP Internals X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints From: ajf@ajf.me (Andrea Faulds) Hi everyone, Just a few small updates. I=E2=80=99ve made a small change to this RFC. Instead of the strict mode = syntax being declare(strict_typehints=3DTRUE), it=E2=80=99s now = declare(strict_types=3D1) instead. This makes it a bit quicker to type - = important given you=E2=80=99d need to type it a lot - without = sacrificing much readability. It also avoids using the words =E2=80=9Ctype= hint=E2=80=9D, which I understand are contentious to some people. The patch now includes a more extensive set of tests: = https://github.com/TazeTSchnitzel/php-src/tree/scalar_type_hints_2_strict_= mode/Zend/tests/typehints/ The pull request is also now green on Travis (aside from two failures on = the debug build - but they also fail in master). Levi=E2=80=99s Return Types RFC has now passed, so now the RFC needs to = cover that. The RFC currently doesn=E2=80=99t discuss return types, save = for a paragraph in the Future Scope section. When the return types patch = is merged, I=E2=80=99ll update the scalars patch, and then update the = RFC. A point of contention here is whether or not return types should = always be strict, or whether they should also obey the strict/weak = modes. I=E2=80=99m not entirely sure on that one, that specific item may = end up going to a vote. That said, I do lean towards always strict, = given you can usually ensure your return type=E2=80=99s correct. Thanks. -- Andrea Faulds http://ajf.me/ PS: It=E2=80=99s rumoured that a certain other female internals = developer may have endorsed this RFC at a certain recent PHP conference. = That=E2=80=99s good to hear!=