Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105330 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 20304 invoked from network); 22 Apr 2019 18:28:11 -0000 Received: from unknown (HELO mail-qk1-f181.google.com) (209.85.222.181) by pb1.pair.com with SMTP; 22 Apr 2019 18:28:11 -0000 Received: by mail-qk1-f181.google.com with SMTP id n81so2752867qke.2 for ; Mon, 22 Apr 2019 08:28:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xcZqlk6jlehS4CSBzYjr7XSWNKZXGScQquOD3qp3Td4=; b=IMYgy0W73yN6tpFGnwnGVJYObkVRb6sWZK/bBsi/RrLZOBLZ9sDa9ROZs06004ZJrZ +XHxcOYfbZhoRrfVZ2VIKziwG5XFiMYR/5GhGBTGlBkOtbA0tH2CjEC6UAS2iQuaYZGP lryq8WNcLEKlxtWapwqzRl2VYEknL3+H31lXcVqJAnKpnu/6Fl8+HOiA553LwgCPHcke 84UEQojA9G9Aiw0nig7ZdobkTzrdLZ2iW2u+3au4cNM0fN/+hlxBEmeO0u8uKHnu8IcB DTuQnkczYSK6hDe5PJ/27RL23HpBrEst3ttkHnlw+2a3DZu7afWNVhXPOmdzJo4vmA5m hduA== X-Gm-Message-State: APjAAAVS8a9Mono0bsNvVXNiMo0/4YFnHoefIMVxUiXKVcsLloXoB3pv V/tchyQ9Ci1exe74u+joRYi39HKG5P2+05aeCCHDGQ== X-Google-Smtp-Source: APXvYqzo0P8oWJhHdej8ZHNUlyE1sBJ0Fw8opdbWfw4rwwkFvf8GL0Q76Sqf+vlYlYebDaXMHItV+x8W3N5Czwu/1g0= X-Received: by 2002:a37:6087:: with SMTP id u129mr15602854qkb.300.1555946900790; Mon, 22 Apr 2019 08:28:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 22 Apr 2019 10:28:09 -0500 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000004fb4c50587201e59" Subject: Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator From: pollita@php.net (Sara Golemon) --0000000000004fb4c50587201e59 Content-Type: text/plain; charset="UTF-8" On Tue, Apr 9, 2019 at 4:54 AM Nikita Popov wrote: > Inspired by Bob's recent RFC for concat precedence, I'd like to propose a > deprecation and removal of the left-associative behavior of ternaries. > Instead, explicit parentheses should be used: > > https://wiki.php.net/rfc/ternary_associativity > > This RFC makes nested ternaries without disambiguating parentheses an error > in PHP 8 -- we might want to consider making them right-associative > instead, which is both useful and matches the behavior of other languages. > > Sorry, but I'm a "No" on this one. It'd be swell if PHP's ternary matched other languages, but it doesn't, and we have 20 years of code in the wild which has accepted that fact and moved on. I don't see the benefit in breaking that code. Advise the use of parentheses and move on. -Sara --0000000000004fb4c50587201e59--