Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-07-16 Thread Josh Bruce
> On Jul 15, 2020, at 3:26 AM, Nikita Popov wrote: > > On Tue, Jul 14, 2020 at 5:37 PM Josh Bruce > wrote: > New to the discussion and being this deep; so, apologies for any bumps. > Mainly questions. > > Does this only affect the string after the “namespace”

Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-07-15 Thread Nikita Popov
On Tue, Jul 14, 2020 at 5:37 PM Josh Bruce wrote: > New to the discussion and being this deep; so, apologies for any bumps. > Mainly questions. > > Does this only affect the string after the “namespace” keyword (make > implicit explicit)? > This affects any place accepting namespaced names. The

Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-07-14 Thread Josh Bruce
New to the discussion and being this deep; so, apologies for any bumps. Mainly questions. Does this only affect the string after the “namespace” keyword (make implicit explicit)? So, things like “use” with a stack of classes within a base namespace would still be possible? On reserved words,

Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-07-14 Thread Brent Roose
Hi Nikita What happens to the attributes syntax if this RFC doesn't pass? Furthermore, I think voting against this RFC to prevent the @@ syntax from happening is an abuse of the system. If there are problems with the attribute syntax, than the vote results on that one should be called void and

Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-06-23 Thread Claude Pache
> Le 16 juin 2020 à 10:52, Nikita Popov a écrit : > > Hi internals, > > Inspired by the recent discussion on reserved keyword reservation, I'd like > to propose the following RFC: > > https://wiki.php.net/rfc/namespaced_names_as_token > > This RFC makes two related changes: Treat namespaced

Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-06-18 Thread Jakob Givoni
On Thu, Jun 18, 2020 at 9:39 AM Nikita Popov wrote: > >> In a mail that probably went to everyone's spam folder, I asked for >> opinions on allowing use of .\Foo as an alternative to Foo in the >> current namespace, thus reducing friction with reserved keywords even >> more. Any thoughts on that

Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-06-18 Thread Nikita Popov
On Thu, Jun 18, 2020 at 8:44 AM Claude Pache wrote: > Hi, > > The following part of the proposal is problematic: Allow keywords in > definition of classes, functions, const, etc. > > class KEYWORD {}interface KEYWORD {}trait KEYWORD {}function KEYWORD() > {}const KEYWORD = 0;use Foo as KEYWORD;

Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-06-18 Thread Nikita Popov
On Thu, Jun 18, 2020 at 12:06 AM Jakob Givoni wrote: > On Tue, Jun 16, 2020 at 10:52 AM Nikita Popov > wrote: > > > > Hi internals, > > > > Inspired by the recent discussion on reserved keyword reservation, I'd > like > > to propose the following RFC: > > > >

Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-06-18 Thread Marcio Almada
Hi, What other language allows this? None that I can think of. Do we want PHP > doing something it's most closely related languages do not allow? Why > don't they allow this? Most language implementations don't do that because we are all using parser generators to do the heavy lifting of

Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-06-18 Thread Claude Pache
Hi, The following part of the proposal is problematic: Allow keywords in definition of classes, functions, const, etc. class KEYWORD {} interface KEYWORD {} trait KEYWORD {} function KEYWORD() {} const KEYWORD = 0; use Foo as KEYWORD; Under your proposal, the following code will compile without

Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-06-17 Thread Michael Morris
What other language allows this? None that I can think of. Do we want PHP doing something it's most closely related languages do not allow? Why don't they allow this? What problems are we creating by allowing this? I can imagine this would make autoloading functions and constants by namespace

Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-06-17 Thread Jakob Givoni
On Tue, Jun 16, 2020 at 10:52 AM Nikita Popov wrote: > > Hi internals, > > Inspired by the recent discussion on reserved keyword reservation, I'd like > to propose the following RFC: > > https://wiki.php.net/rfc/namespaced_names_as_token > > This RFC makes two related changes: Treat namespaced

Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-06-16 Thread Davey Shafik
On Tue, Jun 16, 2020 at 1:34 PM Nikita Popov wrote: > On Tue, Jun 16, 2020 at 10:28 PM Davey Shafik wrote: > >> >> >> On Tue, Jun 16, 2020 at 1:52 AM Nikita Popov >> wrote: >> >>> Hi internals, >>> >>> Inspired by the recent discussion on reserved keyword reservation, I'd >>> like >>> to

Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-06-16 Thread Nikita Popov
On Tue, Jun 16, 2020 at 10:28 PM Davey Shafik wrote: > > > On Tue, Jun 16, 2020 at 1:52 AM Nikita Popov wrote: > >> Hi internals, >> >> Inspired by the recent discussion on reserved keyword reservation, I'd >> like >> to propose the following RFC: >> >>

Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-06-16 Thread Davey Shafik
On Tue, Jun 16, 2020 at 1:52 AM Nikita Popov wrote: > Hi internals, > > Inspired by the recent discussion on reserved keyword reservation, I'd like > to propose the following RFC: > > https://wiki.php.net/rfc/namespaced_names_as_token > > This RFC makes two related changes: Treat namespaced

Re: [PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-06-16 Thread Sebastian Bergmann
Am 16.06.2020 um 10:52 schrieb Nikita Popov: https://wiki.php.net/rfc/namespaced_names_as_token +1 The RFC comes with a small backwards compatibility break related to names that include whitespace, but will hopefully reduce the backwards compatibility impact of future reserved keyword

[PHP-DEV] [RFC] Treat namespaced names as single token, relax reserved keyword restrictions

2020-06-16 Thread Nikita Popov
Hi internals, Inspired by the recent discussion on reserved keyword reservation, I'd like to propose the following RFC: https://wiki.php.net/rfc/namespaced_names_as_token This RFC makes two related changes: Treat namespaced names as a single token, which enables use of reserved keywords inside