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

From: Date: Thu, 16 Jul 2020 13:00:59 +0000
Subject: Re: Re: [RFC] Treat namespaced names as single token, relax reserved keyword restrictions
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-111042@lists.php.net to get a copy of this message
On Thu, July 16 2020 at 3:04 AM Nikita Popov <nikita.ppv@gmail.com> wrote: > While I don't think anyone had plans to mix whitespace, this is > indicative of a larger issue. While I'm one of the people who voted > for @@ as my first choice before, I wouldn't do so now (even with > this RFC accepted). This issue made me realize that there is more at > stake here than just "which syntax is prettier?" and choices that > have a "closing tag" are technically more favorable, especially if > we consider future extensions of the attribute system that may > introduce additional ambiguities (e.g., Rust allows placing > attributes pretty much everywhere in code -- how sure are we that > there will be no unanticipated ambiguities?) Hi Nikita, Can you think of an example that would cause an ambiguity even when namespaced names are treated as tokens? As I understand it, there can't be an ambiguity, since there would always be an attribute token followed by a class name token. It should be possible to put this anywhere it makes sense without ambiguities. Other languages like Java allow attributes/annotations in more places than PHP (e.g. on variables) and the @ syntax doesn't prevent this. Theodore

« previous php.internals (#111042) next »