Re: [RFC] Deprecate left-associative ternary operator

From: Date: Wed, 17 Apr 2019 10:21:04 +0000
Subject: Re: [RFC] Deprecate left-associative ternary operator
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-105307@lists.php.net to get a copy of this message
On Sun, Apr 14, 2019 at 12:12 AM Lauri Kenttä <lauri.kentta@gmail.com> wrote: > On 2019-04-09 12:54, 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: ... > > What about nesting in the middle part: 1 ? 2 ? 3 : 4 : 5 > This is unambiguous and should be allowed IMO. > This case is not affected, as it's not related to associativity. I've mentioned this in the RFC explicitly now. Nikita

« previous php.internals (#105307) next »