Re: Digit separators for numeric literals

From: Date: Thu, 19 Feb 2015 08:11:52 +0000
Subject: Re: Digit separators for numeric literals
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-83156@lists.php.net to get a copy of this message
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 number? I guess we could restrict it to not be leading. I was thinking along the lines of the character being defined to be ignored anywhere in a literal. The underscore was actually rejected in C++14 because C++ has user defined literals. http://en.cppreference.com/w/cpp/language/user_literal which would then make 0x12_ab problematic. We obviously don't have user-defined literals so we probably could make it work. Like I said, that is the only viable option as far as I can see. -Rasmus

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.internals (#83156) next »