Re: [PHP-DEV] [RFC] Change the precedence of the concatenation operator

2019-04-29 Thread Niklas Keller
Am Mo., 29. Apr. 2019 um 09:03 Uhr schrieb Bob Weinand : > > > Am 25.04.2019 um 11:52 schrieb Nikita Popov > mailto:nikita@gmail.com>>: > > On Thu, Mar 28, 2019 at 2:33 PM Bob Weinand > mailto:bobw...@hotmail.com>> wrote: > Hey, > > I feel like concatenation having the same precedence than ad

Re: [PHP-DEV] [RFC] Change the precedence of the concatenation operator

2019-04-29 Thread Clint Priest
Nikita, I'm a bit worried that using this as a standard test suite may (repeatedly?) give us a false sense of security to go ahead with compatibility breaking changes. Composer packages, almost by definition - tend to be of higher quality than the 'average' PHP code (at the very least they're

Re: [PHP-DEV] [RFC] Change the precedence of the concatenation operator

2019-04-29 Thread Zeev Suraski
On Mon, Apr 29, 2019 at 10:55 AM Nikita Popov wrote: > On Mon, Apr 29, 2019 at 9:34 AM Zeev Suraski wrote: > > > > > > > On Thu, Apr 25, 2019 at 12:52 PM Nikita Popov > > wrote: > > > >> On Thu, Mar 28, 2019 at 2:33 PM Bob Weinand > wrote: > >> > >> > Hey, > >> > > >> > I feel like concatenati

Re: [PHP-DEV] [RFC] Change the precedence of the concatenation operator

2019-04-29 Thread Nikita Popov
On Mon, Apr 29, 2019 at 9:34 AM Zeev Suraski wrote: > > > On Thu, Apr 25, 2019 at 12:52 PM Nikita Popov > wrote: > >> On Thu, Mar 28, 2019 at 2:33 PM Bob Weinand wrote: >> >> > Hey, >> > >> > I feel like concatenation having the same precedence than addition and >> > subtraction is promoting pr

Re: [PHP-DEV] [RFC] Change the precedence of the concatenation operator

2019-04-29 Thread Zeev Suraski
On Thu, Apr 25, 2019 at 12:52 PM Nikita Popov wrote: > On Thu, Mar 28, 2019 at 2:33 PM Bob Weinand wrote: > > > Hey, > > > > I feel like concatenation having the same precedence than addition and > > subtraction is promoting programmers to make mistakes. Albeit typically > > easy to catch ones,

Re: [PHP-DEV] [RFC] Change the precedence of the concatenation operator

2019-04-29 Thread Bob Weinand
Am 25.04.2019 um 11:52 schrieb Nikita Popov mailto:nikita@gmail.com>>: On Thu, Mar 28, 2019 at 2:33 PM Bob Weinand mailto:bobw...@hotmail.com>> wrote: Hey, I feel like concatenation having the same precedence than addition and subtraction is promoting programmers to make mistakes. Albeit

Re: [PHP-DEV] [RFC] Change the precedence of the concatenation operator

2019-04-28 Thread Bishop Bettini
On Sun, Apr 28, 2019 at 9:45 PM Stanislav Malyshev wrote: > > > Nikita, impressive leg work; thanks. It validates Bob's intuition from > the > > RFC ("... these occurrences are quite rare as it almost always is an > error > > in the current form, rendering the impact minimal.") > > If the impact

Re: [PHP-DEV] [RFC] Change the precedence of the concatenation operator

2019-04-28 Thread Levi Morrison
On Sun, Apr 28, 2019 at 7:45 PM Stanislav Malyshev wrote: > > Hi! > > > Nikita, impressive leg work; thanks. It validates Bob's intuition from the > > RFC ("... these occurrences are quite rare as it almost always is an error > > in the current form, rendering the impact minimal.") > > If the impa

Re: [PHP-DEV] [RFC] Change the precedence of the concatenation operator

2019-04-28 Thread Stanislav Malyshev
Hi! > Nikita, impressive leg work; thanks. It validates Bob's intuition from the > RFC ("... these occurrences are quite rare as it almost always is an error > in the current form, rendering the impact minimal.") If the impact is minimal, why do it at all? So, at the cost of BC break and breaking

Re: [PHP-DEV] [RFC] Change the precedence of the concatenation operator

2019-04-25 Thread Bishop Bettini
On Thu, Apr 25, 2019 at 5:52 AM Nikita Popov wrote: > On Thu, Mar 28, 2019 at 2:33 PM Bob Weinand wrote: > > > I feel like concatenation having the same precedence than addition and > > subtraction is promoting programmers to make mistakes. Albeit typically > > easy to catch ones, it is a qualit

Re: [PHP-DEV] [RFC] Change the precedence of the concatenation operator

2019-04-25 Thread Nikita Popov
On Thu, Mar 28, 2019 at 2:33 PM Bob Weinand wrote: > Hey, > > I feel like concatenation having the same precedence than addition and > subtraction is promoting programmers to make mistakes. Albeit typically > easy to catch ones, it is a quality of life change at least. > > Hence I'm proposing a R

Re: [PHP-DEV] [RFC] Change the precedence of the concatenation operator

2019-04-02 Thread Björn Larsson
Den 2019-04-01 kl. 23:37, skrev Rowan Collins: On 31/03/2019 14:50, Niklas Keller wrote: An alternative to prevent mistakes in this regard is making this a compile error and requiring parenthesis. If we're going to changes any precedence in the language, please please please can we look at t

Re: [PHP-DEV] [RFC] Change the precedence of the concatenation operator

2019-04-01 Thread Rowan Collins
On 31/03/2019 14:50, Niklas Keller wrote: An alternative to prevent mistakes in this regard is making this a compile error and requiring parenthesis. If we're going to changes any precedence in the language, please please please can we look at the ternary operator associativity? I think mak

Re: [PHP-DEV] [RFC] Change the precedence of the concatenation operator

2019-03-31 Thread Niklas Keller
> Hey, > > I feel like concatenation having the same precedence than addition and > subtraction is promoting programmers to make mistakes. Albeit typically easy > to catch ones, it is a quality of life change at least. > > Hence I'm proposing a RFC changing the precedences: > https://wiki.php.net

Re: [PHP-DEV] [RFC] Change the precedence of the concatenation operator

2019-03-29 Thread David Rodrigues
It makes sense to me. Can you perform some tests with big projects that uses PHPUnit, at least? It will help to identify BC. Em qui, 28 de mar de 2019 às 10:33, Bob Weinand escreveu: > Hey, > > I feel like concatenation having the same precedence than addition and > subtraction is promoting prog

Re: [PHP-DEV] [RFC] Change the precedence of the concatenation operator

2019-03-29 Thread Stanislav Malyshev
Hi! > I feel like concatenation having the same precedence than addition > and subtraction is promoting programmers to make mistakes. Albeit > typically easy to catch ones, it is a quality of life change at > least. Changing operator precedence is usually a very bad idea, because it tends to brea

Re: [PHP-DEV] [RFC] Change the precedence of the concatenation operator

2019-03-28 Thread Arvids Godjuks
Hello, On the one hand - seems logical. On the other hand - makes things less clear when reading the code. With parenthesis, the code is made explicit, so you treat code like given in an example as a code smell. I'd encourage people to always use parentheses. But overall I'd say the change makes