Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76778 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16995 invoked from network); 21 Aug 2014 19:23:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Aug 2014 19:23:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=rican7@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rican7@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.169 as permitted sender) X-PHP-List-Original-Sender: rican7@gmail.com X-Host-Fingerprint: 209.85.223.169 mail-ie0-f169.google.com Received: from [209.85.223.169] ([209.85.223.169:65414] helo=mail-ie0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/27-18459-14746F35 for ; Thu, 21 Aug 2014 15:23:46 -0400 Received: by mail-ie0-f169.google.com with SMTP id rd18so5351662iec.28 for ; Thu, 21 Aug 2014 12:23:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=m8nUN2yUfREjAg1UYZByve9IDlqO9A7KfQS6Lk/J3Ew=; b=JqIyP9yjsOeM32Go9EEh1VdAkZ38/jbTi7qc6uGU42JgjHUyN84490SnSLlUw66oNB 1o+wvC5DHBE+QlYMNkCkKZPKL3vaNcT+DssScLyyXDGFat97lWj8NxtRjGXkf8ah/7e0 hukw9Of1LLmqxD5HlXvo1uoP5TbpOe4X19TyGCoJ+4ZtfdD433+GOkBRR02AG5siQUvZ bB7iV+S04eCkJv1jjsV+2UBPDKMTcDE6VxHMVK+NuLNRof3CHIvVLOm48G23G0RjsReC +Qi/Yh892CkQFEmKoTAMBED0W3ketc2d2Ca6f8/Lyxs5c2PHD+XPefKYlLmWK7UCQNRE 9I1w== MIME-Version: 1.0 X-Received: by 10.50.43.193 with SMTP id y1mr6355033igl.32.1408649022632; Thu, 21 Aug 2014 12:23:42 -0700 (PDT) Received: by 10.64.141.65 with HTTP; Thu, 21 Aug 2014 12:23:42 -0700 (PDT) In-Reply-To: <53F637C5.1030006@sugarcrm.com> References: <53F637C5.1030006@sugarcrm.com> Date: Thu, 21 Aug 2014 15:23:42 -0400 Message-ID: To: Stas Malyshev Cc: Derick Rethans , PHP Developers Mailing List Content-Type: multipart/alternative; boundary=089e0111d1be9bc2e9050128a86c Subject: Re: [PHP-DEV] On BC and not being evil (Was: Re: [PHP-DEV] [RFC] Integer Semantics) From: rican7@gmail.com (Trevor Suarez) --089e0111d1be9bc2e9050128a86c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable What if we were to *quantify* backwards compatibility in a way, as opposed to just discussing the hypothetical BC breaking potential of a change? I've never thought of this before, but this discussion had me thinking... When I write a library that has a large user base, I try to write as many unit tests and potential regression tests as possible. Unfortunately, the larger the user base and the larger the feature set, the more coverage is necessary. A language like PHP, it would be nearly unlimited. But stay with me here. What's better than a simple unit of testing or benchmarking? Most of us know that not much really beats real world application testing, or at least a more realistic form of feature use. This is where the Hack team got it right. Hack, during its early development (and even still) used a suite of PHP frameworks, libraries, and well known projects to test their PHP compatibility. Ironically, I believe that Hack originally used these types of test due to a lack of a language specification: there was no other way to really make sure to match the language's behavior. However I think that this type of testing is valuable anyway. What if we were to create a (or "borrow" Hack's) framework testing suite and run PHP 7 and upcoming RFC patches against the suite before accepting them. Yes, likely things will fail with BC breaks, but then the PHP internals team (or the RFC writer, hopefully) could then see exactly what was being used in a given framework that might break. Even better, the internals/RFC developer could see how much effort would be required to fix the BC break in the broken tested framework and could gauge whether the break was worthwhile or not a lot more. Finally, even more importantly, we could see the range of libraries and frameworks that would break with a given change and even introduce a potential RFC rule for BC breaking (on major versions, etc)... like we have with rules around certain voting majorities based on the type of language change, we could have a certain percentage of libs/frameworks that would have to be compatible (or somehow quantify the effort needed to update each [can it be automated via a tool or not]). Anyway, just spit balling here. I know it would take effort, but this could make a huge difference in our "oops" moments and quality checking for the language updates. Hell, maybe it would even make us more apt to "greenlight" features that we'd otherwise be afraid of because we'd see that it wouldn't be as big of a deal as we thought. Overall I think this would reduce a lot of the conjecture and discussion/fear around possible BC breaks that could help or hurt the project and the future of the language. *Trevor Suarez* +Trevor Suarez @trevorsuarez On Thu, Aug 21, 2014 at 2:17 PM, Stas Malyshev wrote: > Hi! > > >> 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. > > I agree. Major means we *can* break BC, if there's a reason good enough, > but that doesn't mean we get to break BC *for free*. We do need to > carefully weight it each time and ensure it is worth it, not dismiss it > with "oh, it's PHP 7, so we can do anything we want, BC is no longer a > concern". We have millions of people using PHP 5, and the goal is for > almost all of them to eventually use PHP 7, otherwise there's no point > in it. Each BC break creates another hurdle on the way to it. We should > take it seriously. > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --089e0111d1be9bc2e9050128a86c--