Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83443 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17624 invoked from network); 21 Feb 2015 22:48:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Feb 2015 22:48:02 -0000 Authentication-Results: pb1.pair.com header.from=zeev@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=zeev@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.223.173 as permitted sender) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 209.85.223.173 mail-ie0-f173.google.com Received: from [209.85.223.173] ([209.85.223.173:43769] helo=mail-ie0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EE/99-08895-12B09E45 for ; Sat, 21 Feb 2015 17:48:01 -0500 Received: by iebtr6 with SMTP id tr6so15622846ieb.10 for ; Sat, 21 Feb 2015 14:47:58 -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=PFoVfXSWJk1DQLtLYGVhFaZMBwq6rZR6x6gFJOzCU/8=; b=Aw0lZkkC3S68ItzlaIueW1Jk4ErVwR3c73k19akEkauo6aanwR3G8EVsKNAgQ9fmjB /myK1bEyKqBcgo0Vn2wJnuJ2rEtuD52LkeHYfToWpO+WPn0MZBW7kBnRolGvVx8Vci1g NvUw5W/LRvNgTcyAU4PN/jLyMB2rb0s50Y8YcqsCC0De/6NJgUWpxW1pXnEtwukKMPhG f0V3TbFGTQYH08t538m7NxQu7QUjgQ8AmmN2rhk6OZYXBqg2G37a9cs6ZMwAwvIUEPBY 6dYXGbt4lPtZnD7q0sh/7drqlUW07y9/IyaK2H6TP3j1QygI/tFajTvd0Ly38Th7nMiQ uCaA== X-Gm-Message-State: ALoCoQlgz2W2wFNPuffew87q7TIIGGNR8MDZ/N2P40uAVB5/mVE1XVNnvpm57fMZ8PiWPCzs7ln/Vn/IbjPa7lGI1dKIvgUXdmqznTNL5gxRzOVo6r7UauhNVa6xe+ZhmMpYYuIpUF/SVq/wEmuWswYAYrEOKDBVqg== X-Received: by 10.43.103.8 with SMTP id dg8mr4661585icc.18.1424558878407; Sat, 21 Feb 2015 14:47:58 -0800 (PST) References: <7ef509ef10bb345c792f9d259c7a3fbb@mail.gmail.com> <8250289916f5128b5bc1a114428d374e@mail.gmail.com> In-Reply-To: MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQKcPg+jpyYspJS11b5G1A7RBHpKTgFW66vOANg4ZZIBOJUt6QIcwpl/AeIBZpObKJwRgA== Date: Sun, 22 Feb 2015 00:47:57 +0200 Message-ID: To: Anthony Ferrara Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: RE: [PHP-DEV] Coercive Scalar Type Hints RFC From: zeev@zend.com (Zeev Suraski) > -----Original Message----- > From: Anthony Ferrara [mailto:ircmaxell@gmail.com] > Sent: Sunday, February 22, 2015 12:25 AM > To: Zeev Suraski > Cc: PHP internals > Subject: Re: [PHP-DEV] Coercive Scalar Type Hints RFC > > Zeev, > > > "with two potential 'camps' of developers forming up" > > Have you looked at the community lately? That's been happening for a > decade. One camp likes to engineering everything out using classes and > libraries. The other keeps using PHP procedurally and ignoring changing > "best > practices" (and I do mean the quotes). Does that make one better than the > other? NO. I don't think these two camps map to the strict and dynamic camps, definitely not for the userbase at large. Which means that whatever camps we have today, we'd have more - one extra point of division. > And that's PHP's strength. It gives both sides the power to keep doing > what > they want to be doing without having to give up or be burdened by the > other > side. I explained both in the RFC and here why I don't think providing two modes for doing something quite similar are good. We can agree to disagree :) > Sure, some people will do that. Just like people still use single quotes > because > they are faster. Not quite IMHO - that example actually requires some relatively advanced knowledge. Strict, with the amount of noise that Scalar Type Hints are bound to get (and are already getting) - is bound to have a lot more exposure than single quotes being faster ever had. And it's therefore very likely it'll be used by people who shouldn't really be using it. Let's leave the Static Analysis part aside, and agree to disagree as we already did numerous times but failed to implement. > > Two more things regarding the competing RFC =E2=80=93 it=E2=80=99s stil= l alive, and > > being promoted for PHP 7.0; And while it doesn=E2=80=99t create a huge= BC > > break, it allows developers to selectively create localized BC breaks, > > on a per file basis. > > No, it does not. A BC break is something where existing code works, and > you > do nothing more than upgrade and have the new code not work anymore. > > With the other dual-mode RFC, if a user opts-in (enables strict mode), if > code > doesn't work that's not a BC break. That's a case of "you told us explici= t > you > don't want this code to work if it's invalid, and guess what, it's > invalid". That's splitting hairs IMHO. The bottom line is that many people will undergo the same process Rasmus did as he experimented, flipping the switch on because it's a best practice, and start having to fix their code to work= . But we can also agree on what we always agree here too :) Thanks, Zeev