[PHP-DEV] Re: [RFC] Numeric Literal Separator

2019-05-29 Thread Theodore Brown
On Tue, May 28, 2019 at 9:10 AM Theodore Brown wrote: > > As requested at the end of April, [1] Bishop and I are resurrecting > > the Numeric Literal Separator RFC: > > https://wiki.php.net/rfc/numeric_literal_separator. > > > > If no serious issues come up, voting will start in two weeks > > (on

Re: [PHP-DEV] Re: [RFC] Numeric Literal Separator

2019-05-29 Thread Dan Ackroyd
On Wed, 29 May 2019 at 12:35, G. P. B. wrote: > > Also I think those kind of magic numbers should be constants with > meaningful names, and it that case you could just compute them by adding > powers of ten. > E.g. DISCOUNT_IN_CENTS = 1 * 10^5 + 3 * 10^4 + 5 * 10^3; I agree naming things is impor

Re: [PHP-DEV] Re: [RFC] Numeric Literal Separator

2019-05-29 Thread Theodore Brown
On Wed, May 29, 2019 at 9:03 AM Côme Chilliet wrote: > > My understanding from the RFC is that that the grouping is not > > relevant, the `_` is stripped regardless. > > > > Am I wrong? > > No you’re not, the RFC allows grouping as the coder wants. > > Which is why I think it may cause problems b

Re: [PHP-DEV] Re: [RFC] Numeric Literal Separator

2019-05-29 Thread Theodore Brown
On Wed, May 29, 2019 at 6:34 AM G. P. B. wrote: > I share the same concerns as Rowan Collins >From my reading of Rowan's email, he was making a general point that new features can have a cost of added complexity for users. He then clarified "I don't personally think that applies here". > I'm re

Re: [PHP-DEV] Re: [RFC] Numeric Literal Separator

2019-05-29 Thread Côme Chilliet
Le mercredi 29 mai 2019, 10:39:17 CEST Markus Fischer a écrit : > My understanding from the RFC is that that the grouping is not relevant, > the `_` is stripped regardless. > > Am I wrong? No you’re not, the RFC allows grouping as the coder wants. Which is why I think it may cause problems beca

Re: [PHP-DEV] Re: [RFC] Numeric Literal Separator

2019-05-29 Thread Theodore Brown
On Wed, May 29, 2019 at 2:49 AM Côme Chilliet wrote: > What bugs me with this RFC is that it seems to be mainly intended > for grouping digits by 3, which from what I understand is cultural. While it is expected that grouping decimal literals by 3 will be a frequent use case, the RFC does not en

Re: [PHP-DEV] Re: [RFC] Numeric Literal Separator

2019-05-29 Thread G. P. B.
I share the same concerns as Rowan Collins, and I'm really not a fan of the RFC in general. Also I think those kind of magic numbers should be constants with meaningful names, and it that case you could just compute them by adding powers of ten. E.g. DISCOUNT_IN_CENTS = 1 * 10^5 + 3 * 10^4 + 5 * 10

Re: [PHP-DEV] Re: [RFC] Numeric Literal Separator

2019-05-29 Thread Yasuo Ohgaki
On Wed, May 29, 2019 at 5:40 PM Markus Fischer wrote: > Hi, > > On 29.05.19 09:49, Côme Chilliet wrote: > > What bugs me with this RFC is that it seems to be mainly intended for > grouping digits by 3, which from what I understand is cultural. > > At least some asian languages have a concept of >

Re: [PHP-DEV] Re: [RFC] Numeric Literal Separator

2019-05-29 Thread Markus Fischer
Hi, On 29.05.19 09:49, Côme Chilliet wrote: What bugs me with this RFC is that it seems to be mainly intended for grouping digits by 3, which from what I understand is cultural. At least some asian languages have a concept of https://en.wikipedia.org/wiki/Myriad and group them by 4, at least f

Re: [PHP-DEV] Re: [RFC] Numeric Literal Separator

2019-05-29 Thread Christoph M. Becker
On 29.05.2019 at 09:49, Côme Chilliet wrote: > What bugs me with this RFC is that it seems to be mainly intended for > grouping digits by 3, which from what I understand is cultural. > At least some asian languages have a concept of > https://en.wikipedia.org/wiki/Myriad and group them by 4, at

Re: [PHP-DEV] Re: [RFC] Numeric Literal Separator

2019-05-29 Thread Côme Chilliet
What bugs me with this RFC is that it seems to be mainly intended for grouping digits by 3, which from what I understand is cultural. At least some asian languages have a concept of https://en.wikipedia.org/wiki/Myriad and group them by 4, at least from the language point of view. It does seem w