Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79672 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86581 invoked from network); 15 Dec 2014 20:11:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Dec 2014 20:11:29 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.50 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.50 mail-pa0-f50.google.com Received: from [209.85.220.50] ([209.85.220.50:55684] helo=mail-pa0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9A/50-18662-0704F845 for ; Mon, 15 Dec 2014 15:11:28 -0500 Received: by mail-pa0-f50.google.com with SMTP id bj1so12583128pad.9 for ; Mon, 15 Dec 2014 12:11:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=S2nWD71wCzcONBg5L4ip2hwvK5ZgCxVX54u3wL/6hc4=; b=B6KVL2jh9On/tWjpagVV3Wgi19999XAmnZ/9JwNsjHwG6Ff7J6+0gysvi94gybtqmd I6WW8dAJ66v1/b0i5fBJi76/eVFTHfxBWeg9Zuy5XVZ3xdnwcxF+XQl6yKlUov82Er2a EGjOAisLFls2vRXkEktn+nH3spQWNxoRP1bcQRKz/tAv0vUN1z6v8/Qz2qwJJGpEoMYZ odt3IOAN47q/AczO6WLsOuZ+eldVFPCax6uNgs0vhgkDDG9mh0Lzz9evIciEfg4Xo95Q X7ojaquEhsvZpiM65dF/gCqb230kcGODqNqeuFY49JIJWUk6LlC6kYd4SUlGZ7l/Tmnu QlBQ== X-Received: by 10.66.235.37 with SMTP id uj5mr54903092pac.72.1418674285677; Mon, 15 Dec 2014 12:11:25 -0800 (PST) Received: from stas-air.corp.wikimedia.org (tan4.corp.wikimedia.org. [198.73.209.4]) by mx.google.com with ESMTPSA id xk1sm10175847pab.13.2014.12.15.12.11.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Dec 2014 12:11:25 -0800 (PST) Message-ID: <548F406B.1010908@gmail.com> Date: Mon, 15 Dec 2014 12:11:23 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Leon Sorokin , internals@lists.php.net, Derick Rethans References: <548CDF7F.3060805@gmail.com> In-Reply-To: <548CDF7F.3060805@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Fix incorrect ternary '?' associativity for 7.0? From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > The fact that it *may* break *some* code that is used somewhere despite > documentation recommending against it (pretty much deprecating it > already for years) is a terrible reason not to re-evaluate the situation > given the huge opportunity to correct this. It *will* break some code. There's no chance that somebody somewhere doesn't use this. And the change would break it. Worse yet, he won't be able to know about it until the customer complains about code logic being broken. > The only thing that's bonkers here is outright refusal to make trivially > breaking changes (in addition to numerous other breaking changes already > accepted) simply for the sake of not breaking some 0.00001% of outdated, There's not that many breaking changes accepted, and each of them had to be substantiated. "We had other breaking changes" is not a substantiation. For example, "most uses of associativity are wrong ones" - is, but that makes the idea of un-associating it even better, since unlike changing the associativity, it actually makes the problem obvious and easy to fix. Alternatively, of course, we could make a tool that detects this and alerts the user, but making it loud still sounds better. And the breakage we are discussing is not "trivial" - it's a logic change which makes code silently take different codepath without anybody knowing. In the world of BC breaks, this is one of the most evil ones. So we should avoid it as much as possible. > Rather than simply pointing to a 3-year-old close-reason, it would be > prudent to actually get statistics on how often this unexpected behavior > is relied upon in large, popular codebases. Packagist & Github, that Usually the burden of proof lays on whoever proposes the change. Note that a lot of code is not public, especially for languages like PHP that is used for websites - meaning, there's little reason to publicize any code but reusable library code. And the fact that the change would not break a handful of popular libraries doesn't mean it won't break scores of websites whose source you can not see, but which are way more important for the people using them than some library they don't use. Yes, I understand that this means very high burden on somebody proposing BC-breaking change, and it makes the development more conservative. It is a high burden convince people that this change is worth the risk of breaking potentially unknown code with unknown consequences. I think, however, it's better than actually suffering these consequences. Consider that however ugly this particular wart is, people has been living with it for almost 20 years, and it may be preferable for them to have somewhat ugly code than having broken code. > It's short responses like this and the continued reliance on arguments > posed in a different era/landscape that compel me to reconsider my > continued participation in the PHP community at all. Sorry, but arguing from "do this or that or I'm quitting" does not seem a very strong argument to me. More drama does not help to evaluate the merits of changing the associativity of ?:. I think everybody here values the time of the volunteers that continue to contribute to the project, but I think keeping the discussion on the technical merits would be better. -- Stas Malyshev smalyshev@gmail.com