Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81982 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3641 invoked from network); 5 Feb 2015 23:51:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2015 23:51:36 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.208 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.208 imap2-3.ox.privateemail.com Received: from [192.64.116.208] ([192.64.116.208:48227] helo=imap2-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5E/64-17766-70204D45 for ; Thu, 05 Feb 2015 18:51:35 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 194278C007D; Thu, 5 Feb 2015 18:51:32 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap2.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap2.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nU_AbJe9aOXF; Thu, 5 Feb 2015 18:51:31 -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 854CB8C0075; Thu, 5 Feb 2015 18:51:31 -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:51:29 +0000 Cc: PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <8703B53E-2C4A-4AC6-95C4-D4F19C6D5221@ajf.me> To: Dan Ackroyd X-Mailer: Apple Mail (2.2070.6) Subject: Re: [PHP-DEV] [VOTE] Scalar Type Hints From: ajf@ajf.me (Andrea Faulds) Hi Dan, > On 5 Feb 2015, at 23:41, Dan Ackroyd wrote: >=20 > As much as I want scalar types I'm voting no as: >=20 > i) Having this code: >=20 > function foo(int $numberOfRightTurns) { > $x =3D $numberOfRightTurns * 90; > return sin(deg2rad($x)) > } >=20 > work or blow up depending on a setting at the top of the file is = horrible. =46rom what I=E2=80=99ve seen this is a rather uncommon case. Also, that code only works for some integer values and not others: the = strict version is uniformly broken, the weak version is sometimes = broken. > ii) Having the code that I write in userland behave differently > depending on how people call it, is also horrible. Your code always behaves identically. > Additionally Andrea, I am disappointed that you opened voting without > a option with the 'declare' stuff removed. This is despite myself > having asked you for an vote option for just strict types directly > several times. Other people have asked for a vote option that allows > strict and weak types with a different syntax. Yes, I realise you and others have asked for such things. I disagree = with you there and I don=E2=80=99t think adding strict types to PHP is = really a good idea. I=E2=80=99d prefer we have more rather than less = consistency between userland and internals. > I realise that the RFC as it stands is your preferred option, but just > not accepting feedback during an RFC is not appropriate. I have listened to feedback. But listening to feedback and agreeing to = any and all suggestions are not the same thing. -- Andrea Faulds http://ajf.me/