Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82302 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 564 invoked from network); 9 Feb 2015 18:19:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Feb 2015 18:19:12 -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:36501] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F0/C1-25034-C1AF8D45 for ; Mon, 09 Feb 2015 13:19:10 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 5403C2400DA; Mon, 9 Feb 2015 13:19:06 -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 tKL-FWB_ZZE2; Mon, 9 Feb 2015 13:19:06 -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 852D62400E5; Mon, 9 Feb 2015 13:19:02 -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: Mon, 9 Feb 2015 18:19:00 +0000 Cc: Andrey Andreev , Jordi Boggiano , "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: References: <8703B53E-2C4A-4AC6-95C4-D4F19C6D5221@ajf.me> <54D5659D.5000602@php.net> <54D7A6DB.3050209@seld.be> <74136F1E-817F-4A33-8228-B47045DD65C3@ajf.me> <54D7EB44.9010005@gmail.com> <54D7F972.4010107@seld.be> <2013B2A4-74E6-4452-8A48-E749DCBEA2EF@zend.com> <6C020C7F-85C0-4C88-8766-48CEDA6290F8@ajf.me> <3399a072b6cb66434e72c5f5b37d5df0@mail.gmail.com> <54D8ECCF.4000202@seld.be> To: "guilhermeblanco@gmail.com" X-Mailer: Apple Mail (2.2070.6) Subject: Re: [PHP-DEV] [VOTE] Scalar Type Hints From: ajf@ajf.me (Andrea Faulds) Hi Guilherme, > On 9 Feb 2015, at 18:12, guilhermeblanco@gmail.com wrote: >=20 > I read again and again the RFC and I just decided to switch my vote. > Originally a "YES" voter, I'm now a "NO" voter. I still want strict = types > to exist in PHP, and not only at the end-user level, but also at the > internals level (I can see so many optimizations around...). > However, I think it's not an INI setting or a per file operation. I > consider it should be (at the current PHP's pace) a heavily flexible > support. I tend to agree that if you put "string" in its definition, = you > don't want a weak type, but strict type, the same way when you put = MyClass > instead of nothing. >=20 > That's why I don't agree with the declare or "use strict" or If I say "string $foo", I want a string, not a converted value. By > accepting this fact, makes easier in the future to make OO primitive = types > if we wish, and also makes everything easier for everyone... if you = have > foo(string $name), you expect strict type... if you want weak type, > foo($name). All code will work as is today, no BC breaks. >=20 > That's my 2 cents... now time to update my vote in RFC. I can understand that viewpoint, but it=E2=80=99s not terribly kind on = your users. You=E2=80=99re basically saying that you want to force = people who=E2=80=99d prefer weak typing to use strict typing if they use = your API. It=E2=80=99s doing this which this RFC is designed to prevent. = I don=E2=80=99t think allowing people to force their way on their users = is a good way to deal with the lack of weak or strict consensus in the = community, no matter whether it=E2=80=99s nice for API design or not. Thanks. -- Andrea Faulds http://ajf.me/