Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-24 Thread Sara Golemon
On Wed, Apr 24, 2019 at 6:48 PM Christoph M. Becker wrote: > On 24.04.2019 at 19:25, Sara Golemon wrote: > > > On Tue, Apr 23, 2019 at 3:56 AM Nikita Popov > wrote: > > > >> 20 years of code in the wild has not "accepted that fact and moved on". > If > >> a left-associative ternary is used, it

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-24 Thread Christoph M. Becker
On 24.04.2019 at 19:25, Sara Golemon wrote: > On Tue, Apr 23, 2019 at 3:56 AM Nikita Popov wrote: > >> 20 years of code in the wild has not "accepted that fact and moved on". If >> a left-associative ternary is used, it is almost certainly a bug. If people >> use this structure by accident

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-24 Thread Sara Golemon
On Wed, Apr 24, 2019 at 1:56 PM M. W. Moe wrote: > until this RCF does not happen; I would say nothing interesting will ever > happen. > > Please, Reality TV is less hyperbolic than that. JIT isn't interesting? Typed Properties isn't interesting? FFI isn't interesting? Preload isn't

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-24 Thread M. W. Moe
Hello, the underlaying discussion here is more important; than just voting yes or no on uncompleted hamiltonian graphs; the real question here does php8 will be a break thru; meaning bugger off the mistakes of the past or a continuation of them; until this RCF does not happen; I would say nothing

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-24 Thread Sara Golemon
On Tue, Apr 23, 2019 at 3:56 AM Nikita Popov wrote: > Can't say I understand your position here. Don't want to change the > ternary from left-associative to right-associative? I can understand that: > Silent behavior changes are always problematic. This is not what the RFC > proposes though. > >

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-24 Thread Claude Pache
> Le 24 avr. 2019 à 11:10, Björn Larsson a écrit : > > Den 2019-04-22 kl. 10:09, skrev Nikita Popov: >> On Tue, Apr 9, 2019 at 11:54 AM Nikita Popov wrote: >> >>> Hi internals, >>> The only objection here came from Gabriel, and I don't think we'll come to >>> an agreement. >>> Inspired by

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-23 Thread Nikita Popov
On Mon, Apr 22, 2019 at 5:28 PM Sara Golemon wrote: > 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

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-22 Thread Stanislav Malyshev
Hi! > 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. Exactly. -- Stas Malyshev

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-22 Thread Sara Golemon
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: > >

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-17 Thread Nikita Popov
On Sun, Apr 14, 2019 at 12:12 AM Lauri Kenttä 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

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-13 Thread Lauri Kenttä
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

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-10 Thread Björn Larsson
Den 2019-04-09 kl. 11:54, skrev Nikita Popov: Hi internals, 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:

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-10 Thread Claude Pache
> Le 10 avr. 2019 à 21:21, Stanislav Malyshev a écrit : > > Hi! > >> 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: >> >>

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-10 Thread Levi Morrison
On Wed, Apr 10, 2019 at 1:22 PM Stanislav Malyshev wrote: > > Hi! > > > 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: > > > >

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-10 Thread Michael Wallner
Nikita Popov schrieb am Di., 9. Apr. 2019, 11:54: > Hi internals, > > 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: > >

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-10 Thread Stanislav Malyshev
Hi! > 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 Please, let's not mess with language syntax

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-09 Thread Rowan Collins
On Tue, 9 Apr 2019 at 11:19, Bishop Bettini wrote: > See also Bug 61915[1], which suggests leaving ? left and introducing ?? for > right. Personally I don't see any benefit to keeping a ternary with left > associativity. > ?? wouldn't work, because that's now the null-coalescing operator.

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-09 Thread Gabriel O
Hello, I am interested to know if this affects behaviour of following code: putenv($this->colSize ? 'COLUMNS' : 'COLUMNS='.$this->colSize); > On 9. Apr 2019, at 11:54, Nikita Popov wrote: > > Hi internals, > > Inspired by Bob's recent RFC for concat precedence, I'd like to propose a >

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-09 Thread Rowan Collins
On Tue, 9 Apr 2019 at 10:54, Nikita Popov wrote: > Hi internals, > > 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: > >

Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-09 Thread Bishop Bettini
On Tue, Apr 9, 2019 at 5: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: > >

[PHP-DEV] [RFC] Deprecate left-associative ternary operator

2019-04-09 Thread Nikita Popov
Hi internals, 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