Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79687 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40707 invoked from network); 16 Dec 2014 05:50:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Dec 2014 05:50:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.49 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 209.85.218.49 mail-oi0-f49.google.com Received: from [209.85.218.49] ([209.85.218.49:58282] helo=mail-oi0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/B0-34244-828CF845 for ; Tue, 16 Dec 2014 00:50:32 -0500 Received: by mail-oi0-f49.google.com with SMTP id i138so9132694oig.22 for ; Mon, 15 Dec 2014 21:50:29 -0800 (PST) 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=WSf0O9erQmFh96WOcNhK3XSw5qdG7Pi+S6y44ajZetI=; b=cyM9JDbSY8mv8ZVQZLxtxsfgdrwlroktaQNtDskNMZkRAOweTpsJJpVr47ZPWJVgsy ppIiuKAFwZDxrN7YSePnBwzGMHXLUZ8TyqOGhidHG1Slw1QjiTTva5H0xkuLJrTesM7U YuBYERaWio5Tpk3wzlE1wM7mSAxKFPlL8KjWIHz81bcTmaVnNsusiqWXxLNwy9Tq0oMZ PNR+xLAQQD3A6TDC6NRiLexR3pwHE2FsfDR5HcVQ6cSVPanRytJQc6XbUCZa+EsrkAt3 nPHoQJlvvCVuyuV2XJN8Geqji178GZfXEiBPji93nv0HaZ0ddjE9Z578BKsYneJiFKj1 47qg== MIME-Version: 1.0 X-Received: by 10.60.96.68 with SMTP id dq4mr21507758oeb.47.1418709029829; Mon, 15 Dec 2014 21:50:29 -0800 (PST) Received: by 10.202.227.18 with HTTP; Mon, 15 Dec 2014 21:50:29 -0800 (PST) In-Reply-To: <548FB2E4.2030608@gmail.com> References: <548D494B.8010901@gmail.com> <548DC988.6030108@gmail.com> <548E84D1.9030401@gmail.com> <94025CC8-8A1A-4A28-BD7B-9E122CAD31FB@thesba.com> <548FB2E4.2030608@gmail.com> Date: Mon, 15 Dec 2014 21:50:29 -0800 Message-ID: To: Leon Sorokin Cc: PHP internals list , Robert Williams Content-Type: multipart/alternative; boundary=089e01228b60c3446f050a4eef1c Subject: Re: [PHP-DEV] Fix incorrect ternary '?' associativity for 7.0? From: kris.craig@gmail.com (Kris Craig) --089e01228b60c3446f050a4eef1c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Dec 15, 2014 at 8:19 PM, Leon Sorokin wrote: > > On 12/15/2014 11:59 AM, Robert Williams wrote: > >> What world is this that you live in where every line of code that=E2=80= =99s >> written is fully unit-tested >> > > You took my example too literally; forget the unit tests. Imagine the > situation differently: > > 1. Someone wrote this function: > > function add_five_pct($num) { > return $num * 1.10; > } > > 2. This function was then used to calculate profit margin and display > retail prices on your site and business has been great! Unknowingly, you'= ve > been making 2x what was intended with no ill effects! > > 3. A new hire then went through this code on his own accord and decided, > 'wait, this function is a bug!' and took it upon himself to fix it to '$n= um > * 1.05'. > > Would you say the e-commerce site has been 'fixed' to work correctly? > Should the dev be praised for fixing the clearly broken function without > consulting anyone? > > I cannot come up with a clearer explanation of how a 'silent' code fix ca= n > foul up the bigger picture in non-beneficial ways. That's the scenario > that's being discussed here. The main point of contention is, no one know= s > how much code exists in the wild that uses and relies on this misbehavior= . > My argument is 'negligible', others say it's 'non-negligible'. And the > whole comedy is, no one can actually provide definitive numbers since > nobody will ever know but a tiny portion of all source code that is out > there, so all arguments stem from 'meta' evidence and personal experience= . > > > -- > Leon Sorokin > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > Precisely why I suggested we do a poll and find out. Polling is a valid means of getting a reasonable accounting of a particular metric. If we use a sufficiently diverse and representative sample, we should easily be able to get accurate enough results to settle this question once and for all. The only cost is effort. --Kris --089e01228b60c3446f050a4eef1c--