Re: [PHP-DEV] Digit separators for numeric literals

2015-02-19 Thread Michael Wallner
On 19/02/15 13:16, Nikita Nefedov wrote: Why not space? It's certainly possible (I just checked) and it would look clear I guess: my_func(1 999 999); Yes, but what if I just missed one or two commas there? ;) -- Regards, Mike -- PHP Internals - PHP Runtime Development Mailing

Re: [PHP-DEV] Digit separators for numeric literals

2015-02-19 Thread Nikita Nefedov
2015-02-19 6:44 GMT+04:00 Rasmus Lerdorf ras...@lerdorf.com: I think it will be difficult to find a separator character that doesn't make a mess of the grammar. my_func(1,999,999) obviously doesn't work my_func(1'999'999) as per C++14 clashes with our single-quoted strings

Re: [PHP-DEV] Digit separators for numeric literals

2015-02-19 Thread Christoph Becker
Rasmus Lerdorf wrote: On 02/18/2015 11:21 PM, Rick Widmer wrote: how about: my_func( '1,000.04' ); //if you want to use separators there. The problem with that is that the world is split. The other half, or actually more than half, would write that as '1.000,04'. There is no way we

Re: [PHP-DEV] Digit separators for numeric literals

2015-02-19 Thread Rasmus Lerdorf
On 02/18/2015 11:49 PM, Michael Wallner wrote: On 19/02/15 03:44, Rasmus Lerdorf wrote: but _999_ would need to work as well and _ is a valid char in a constant so you can have a constant named _999_. Why would we need to support the underscore in front (and maybe even at the end) of a

Re: [PHP-DEV] Digit separators for numeric literals

2015-02-19 Thread Christoph Becker
Nikita Nefedov wrote: 2015-02-19 6:44 GMT+04:00 Rasmus Lerdorf ras...@lerdorf.com: I think it will be difficult to find a separator character that doesn't make a mess of the grammar. Why not space? It's certainly possible (I just checked) and it would look clear I guess: my_func(1

Re: [PHP-DEV] Digit separators for numeric literals

2015-02-18 Thread Rick Widmer
On 2/18/2015 7:44 PM, Rasmus Lerdorf wrote: On 02/18/2015 06:07 PM, Christoph Becker wrote: Hi internals! A while ago a question was asked on the php-general mailing list with regard to digit seperators in numeric literals[1]. IMHO it might be a useful enhancement to allow such digit

Re: [PHP-DEV] Digit separators for numeric literals

2015-02-18 Thread Michael Wallner
On 19/02/15 03:44, Rasmus Lerdorf wrote: but _999_ would need to work as well and _ is a valid char in a constant so you can have a constant named _999_. Why would we need to support the underscore in front (and maybe even at the end) of a number? -- Regards, Mike -- PHP Internals - PHP

Re: [PHP-DEV] Digit separators for numeric literals

2015-02-18 Thread Rasmus Lerdorf
On 02/18/2015 11:21 PM, Rick Widmer wrote: On 2/18/2015 7:44 PM, Rasmus Lerdorf wrote: Now if we went into Unicode territory, we could do it. eg. my_func(1 999 999) U+1680 (although it looks too much like a -) my_func(1 999 999) U+205F (mathematical space) my_func(1٬999٬999) U+066C

[PHP-DEV] Digit separators for numeric literals

2015-02-18 Thread Christoph Becker
Hi internals! A while ago a question was asked on the php-general mailing list with regard to digit seperators in numeric literals[1]. IMHO it might be a useful enhancement to allow such digit separators for numeric (integer and float) literals in PHP for better readability; several other

Re: [PHP-DEV] Digit separators for numeric literals

2015-02-18 Thread Rasmus Lerdorf
On 02/18/2015 06:07 PM, Christoph Becker wrote: Hi internals! A while ago a question was asked on the php-general mailing list with regard to digit seperators in numeric literals[1]. IMHO it might be a useful enhancement to allow such digit separators for numeric (integer and float)