Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80537 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76411 invoked from network); 15 Jan 2015 14:09:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2015 14:09:44 -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:42361] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1F/F9-14306-72AC7B45 for ; Thu, 15 Jan 2015 09:09:44 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id A6D142400D4; Thu, 15 Jan 2015 09:09:39 -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 U3pDzEH9Ckh3; Thu, 15 Jan 2015 09:09:39 -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 83C152400C3; Thu, 15 Jan 2015 09:09:38 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: <6105ea99002e634373c09685310e26a6@mail.gmail.com> Date: Thu, 15 Jan 2015 14:09:35 +0000 Cc: RQuadling@gmail.com, Leigh , PHP Internals List Content-Transfer-Encoding: quoted-printable Message-ID: References: <8DCD1B72-C81D-499E-B455-E4A042CD76E6@ajf.me> <4E2073DE-0951-498C-97BB-DDAC094F11FA@ajf.me> <9a033dd1f223f854e760924d118ab812@mail.gmail.com> <2ae0164cb9b9bf1c974d7a3c60af0466@mail.gmail.com> <6105ea99002e634373c09685310e26a6@mail.gmail.com> To: Zeev Suraski X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2 From: ajf@ajf.me (Andrea Faulds) Hi Zeev, > On 15 Jan 2015, at 11:56, Zeev Suraski wrote: >=20 > Andrea, >=20 > I'm not sure what you're basing that assumption on. The incidental > interactions you (or anybody) may have with 'the community', by no way > represent the opinion of the community at large. The vast majority of = the > PHP community never ever interacts with internals@, never attend > conferences, don't write blog posts about PHP and are generally = completely > 'under the radar'. I would actually go to argue that the people who = do > attend conferences, participate on internals@ or write blog posts - = are not > representative of the PHP userbase at large. The vast majority of > developers I bump into - you will never ever hear from. They = constitute the > vast majority of the ~5M strong PHP developer base. >=20 > So even though my belief / educated guess is that the vast majority of = the > PHP userbase would prefer to see strict typing kept off this language, = I'm > not going to argue that - but we must not argue the opposite either, = based > on the non-representative anecdotal data from a few dozen people. Whether or not they are in the majority, a very large portion of PHP = developers would prefer strict typing. In particular, the most vocal = ones would seem to. There are also a lot of PHP developers who would = prefer weak typing. Thus we have a problem: either approach to scalar = hints will upset a large portion of the community. >=20 >> Myself, I might have been somewhat happy with just weak hints, but >> it would upset an awful lot of developers who would like some measure = of >> strict typing. Developers who would most likely not use the new = scalar >> type >> hints, because they weren=E2=80=99t strict. And if nobody uses them, = why add them? >=20 > How do you deduce that 'nobody uses them' from the fact that some = group of > people said they won't? I'm sorry, but it makes no sense, especially = given > the positive feedback you saw on internals, making it clear that there = would > be in fact people using it. Not all of it was positive. Sure, a lot of people would use them though, = but I=E2=80=99ve heard quite a few developers say they wouldn=E2=80=99t = use them and continue to use manual (!is_int($foo))-style assertions. > If there's one thing that's worse than introducing an alien concept = like > strict typing into PHP, it's introducing it as a feature that will = include > all the negatives of this alien concept, PLUS have the ability to = radically > change how it behaves based on a runtime option. This isn=E2=80=99t a runtime option, it is entirely compile-time. Much = like namespaces are not a runtime option. There isn=E2=80=99t even the = ability to toggle it at runtime, unless we somehow add some ability to = edit the flags on individual opcodes. Thanks. -- Andrea Faulds http://ajf.me/