Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76786 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50742 invoked from network); 22 Aug 2014 02:27:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Aug 2014 02:27:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.49 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.215.49 mail-la0-f49.google.com Received: from [209.85.215.49] ([209.85.215.49:49095] helo=mail-la0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 77/D0-43715-A7AA6F35 for ; Thu, 21 Aug 2014 22:27:07 -0400 Received: by mail-la0-f49.google.com with SMTP id hz20so9309753lab.22 for ; Thu, 21 Aug 2014 19:27:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=HnvdZ+1xlCl3RV3fXyJ/JSDdPcj4UhtbevChuiOjhmk=; b=XbzSdg95Ff0jQTdry/PyVQpX2yhvDOjABFFNbRuasIfFFOQi29JGUdlDnxP7Pb4yw3 3Z9pkkARd8cLH31eW29tqZUJLzRhDRR5qtjkMQ74HzHwAFYaZEOVIiajCrxaK410Q6qW Hmb/wtDy04XyjxN01kNMtULbS9H8dIFh8RvillLdvFNl8uwMgT/wgVwdFnlgwrV6ybVD DK47FvN4XzqPbHsviVvuQGt3f4hnWBolSV6vpDiIckwmCZ+ahdbRrxGUfOMFWnnKiSKT OxGBaVokgn3eqC9Ifco0Wgg1B7WJBqjONZIPHpdAaYK0aG/wisB1aPtFkGIUzftgw/74 mf1Q== X-Received: by 10.152.229.133 with SMTP id sq5mr1845511lac.67.1408674423822; Thu, 21 Aug 2014 19:27:03 -0700 (PDT) MIME-Version: 1.0 Sender: laruence@gmail.com Received: by 10.114.187.72 with HTTP; Thu, 21 Aug 2014 19:26:43 -0700 (PDT) In-Reply-To: References: Date: Fri, 22 Aug 2014 10:26:43 +0800 X-Google-Sender-Auth: o4vf8D78AAkgFAQkcdJpSRosRmY Message-ID: To: Derick Rethans Cc: PHP Developers Mailing List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] On BC and not being evil (Was: Re: [PHP-DEV] [RFC] Integer Semantics) From: laruence@php.net (Laruence) Hey: On Thu, Aug 21, 2014 at 11:30 PM, Derick Rethans wrote: > On Tue, 19 Aug 2014, Kris Craig wrote: > >> On Tue, Aug 19, 2014 at 3:36 PM, Andrea Faulds wrote: >> >> > I have made an RFC which would make some small changes to how integers >> > are handled, targeted at PHP 7: >> > >> > https://wiki.php.net/rfc/integer_semantics >> > >> > Thoughts and questions are appreciated. Thanks! >> >> >> >> And since you're targetting the next major release, BC isn't an issue. > > This sort of blanket statements that "Backwards Compatibility is not an > issue" with a new major version is extremely unwarranted. *Extreme care* > should be taken when deciding to break Backwards Compatibility. It > should not be "oh we have a major new version so we can break all the > things"=E2=84=A2. > > There are two main types of breaking Backwards Compatibility: > > 1. The obvious case where running things trough ``php -l`` instantly > tells you your code no longer works. Bugs like the two default cases, > fall in this category. I have no problem with this, as it's very easy > to spot the difference (In the case of allowing multiple "default" > cases, it's a fricking bug fix too). > > 2. Subtle changes in how PHP behaves. There is large amount of those > things currently under discussion. There is the nearly undetectable > change of the "Uniform Variable Syntax", that I already `wrote > about`_, the current discussion on `"Binary String Comparison"`_, > and now changing the `behaviour`_ on ``<<`` and ``>>`` in a subtle > way. These changes are *not okay*, because they are nearly > impossible to test for. > > Changes that are so difficult to detect, mean that our users need to > re-audit and check their whole code base. It makes people not want to > upgrade to a newer version as there would be more overhead than > gains. Heck, even changing the ``$`` in front of variables to ``=C2=A3= `` > is a better change, as it's *immediately* apparent that stuff > changed. And you can't get away with "But Symfony and ZendFramework > don't use this" either, as there is so much code out there I am totally agree with Derick here. We should avoid to change such basic behaves.. thanks > > As I said, the first type isn't much of a problem, as it's easy to find > what causes such Backwards Compatibility break, but the second type is > what causes our users an enormous amount of frustration. Which then > results in a lot slower adoption rate=E2=80=94if they bother upgrading at= all. > Computer Science "purity" reasons to "make things better" have little to > no meaning for PHP, as it's clearly not designed in the first place. > > Can I please urge people to not take Backwards Compatibility issues so > lightly. Please think really careful when you suggest to break Backwards > Compatibility, it should only be considered if there is a real and > important reason to do so. Changing binary comparison is not one of > those, changing behaviour for everybody regarding ``<<`` and ``>>`` is > not one of those, and subtle changes to what syntax means is certainly > not one of them. > > **Don't be Evil** > > > cheers, > Derick > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php --=20 Laruence Xinchen Hui http://www.laruence.com/