Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80534 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66016 invoked from network); 15 Jan 2015 11:56:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2015 11:56:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=zeev@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=zeev@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.212.173 as permitted sender) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 209.85.212.173 mail-wi0-f173.google.com Received: from [209.85.212.173] ([209.85.212.173:54540] helo=mail-wi0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 60/98-14306-DEAA7B45 for ; Thu, 15 Jan 2015 06:56:30 -0500 Received: by mail-wi0-f173.google.com with SMTP id hi2so11694006wib.0 for ; Thu, 15 Jan 2015 03:56:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=rNXJBYbFPCRn4mE+poWdCs3ZBKqP3TpCo9/xumD3KuM=; b=ifPRLwu01nBmXX8JBNTIQM2wbln8ZDlkds1H9wyiJwYzkzv5avZDccY5lZw83aAerw PYawepOXgxl8PXVJGeccudzRfj2m3fHB/DmGa8OGvbLNx4LspRQ/h9eLb/7OJ5fDWM9m RfS8CbaGPctb3TPtjG+Cf6PCQKm2lkxIk9oD1pO1q2RO0CDSntI0jqUroSsCAGpMyG4t X9nNiJ7oYFIgOm/yzZebQyjdQLcSRivvRyJEAZMC3S4InAEDcoU4KgwlzWP7t76w5fbD 5A4ZSuJn2VAwNolyJlKmfkugC0J39LtQTYn4sZdUYmtH78j4NmCRt2d3BGgvzfTKi4cE x1ug== X-Gm-Message-State: ALoCoQlHJMxHHs/WJ/Hzm6KB0Sx0WyS7fqUsGaHoS5yxaBhXa4cZOaHX/6l0Nps5MFyrIft76N5nOhQdAmjN2YoEg+0/WgdM3mPKzOkSOpL6pP27z0CyIEHHoWCThEEDloMr4nHygaOcQzlNvmrLYYQsNEiTfcTUKQ== X-Received: by 10.194.2.240 with SMTP id 16mr17121460wjx.108.1421322986003; Thu, 15 Jan 2015 03:56:26 -0800 (PST) References: <8DCD1B72-C81D-499E-B455-E4A042CD76E6@ajf.me> <4E2073DE-0951-498C-97BB-DDAC094F11FA@ajf.me> <9a033dd1f223f854e760924d118ab812@mail.gmail.com> <2ae0164cb9b9bf1c974d7a3c60af0466@mail.gmail.com> In-Reply-To: MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQGo6gmoLPH7aNIVeHjTN7HPWATOMwFgXHbXAiinDCoCNhsVSQIuHXg7AMzhfAQCiQHczZy1gE0Q Date: Thu, 15 Jan 2015 13:56:24 +0200 Message-ID: <6105ea99002e634373c09685310e26a6@mail.gmail.com> To: Andrea Faulds Cc: RQuadling@gmail.com, Leigh , PHP Internals List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: RE: [PHP-DEV] [RFC] Scalar Type Hints v0.2 From: zeev@zend.com (Zeev Suraski) > -----Original Message----- > From: Andrea Faulds [mailto:ajf@ajf.me] > Sent: Thursday, January 15, 2015 12:29 AM > To: Zeev Suraski > Cc: RQuadling@gmail.com; Leigh; PHP Internals List > Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2 > > Hi Zeev, > > > On 14 Jan 2015, at 13:35, Zeev Suraski wrote: > > > > I don=E2=80=99t think we=E2=80=99re ever going to get consensus. But j= udging by the > feedback to the v0.1 version, I tend to disagree that the opposers would > have blocked it. There were certainly opposers =E2=80=93 but not that ma= ny of > them > as far as I could tell. I think it stood a good chance to pass at a 2/3. > Unlike > strict typing =E2=80=93 we didn=E2=80=99t even go to a vote on it, which = I think is > unfortunate > (and should be changed, before changing course completely as this v0.2 > suggests). > > > > We=E2=80=99re definitely not going to have consensus on introducing bot= h options > as per this RFC. I for one think it=E2=80=99s the worst possible option. > > It=E2=80=99s certainly possible it would=E2=80=99ve succeeded on internal= s. However, it is > also > worth considering the opinions of those who do not frequent internals and > don=E2=80=99t have the right to vote. > > From what I can see, the larger PHP community is generally in favour of > strict > typing, and among them, the previous RFC revision was received quite > poorly. Andrea, 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 th= e vast majority of the ~5M strong PHP developer base. 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. >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? 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 woul= d be in fact people using it. Note that unlike the opposition to strong typing - which has always been about the fact that the concept of strict typing is alien to and inconsistent with rest of PHP - the opposition to auto-casting typing is "I won't use it because it doesn't do what I'd like it to do". People who don't want to use it won't use it, but based on the feedback v0.1 received, it was clear plenty of people would. > This revision hopes to possibly placate both weak and strict typing > advocates. Of course, it also will lose some support in that it allows a > choice. > Plus, it gives the user choice, not the API designer, which I expect will > be > somewhat controversial. But I am hopeful. I'm not sure what to say, so I'll repeat what I said before. 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. It's so bad that we decided more than a decade ago that we want to refrain from ever introducin= g such elements to PHP again (e.g. magic_quotes_runtime), and I'm not sure wh= y we're even discussing it. To be honest, before you wrote the v0.1 RFC I was talking with Dmitry regarding the possibility of writing one up myself. You saved me a lot of work by working on one. I hope that based on the feedback from numerous people here you'll abandon v0.2, but if not, I'd want take over v0.1 of the RFC and propose it as an alternative. v0.2 as disastrous for PHP. Zeev