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

From: Date: Thu, 18 Jun 2020 07:34:42 +0000
Subject: Re: [RFC] Treat namespaced names as single token, relax reserved keyword restrictions
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-110646@lists.php.net to get a copy of this message
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 parsing and these often force us to pretend our programming languages are context free, and we accept that for convenience. But most of the programming languages - C, C++, Python, Ruby, JS, PHP, SQL - are not really context-free. > What problems are we creating by allowing this? In that case, this RFC makes it unnecessary to soft reserve words like enum to avoid BC breaks during PHP8 lifetime. > I can imagine this would make autoloading functions and constants by > namespace more complicated, but I'm not sure. I don't see how this would be harder with this proposal being accepted. Ty, Márcio Almada

« previous php.internals (#110646) next »