Re: [RFC] [Discussion] Shorter Attribute Syntax Change
| From: | tyson andre | Date: | Thu, 30 Jul 2020 13:59:26 +0000 |
| Subject: | Re: [RFC] [Discussion] Shorter Attribute Syntax Change | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-111265@lists.php.net to get a copy of this message | ||
Hi Benjamin,
> The reason is not only Joe's desire to revote on #[], but also that there
> are now more syntax proposals such as @[] by Derick or @@ in comments by
> Tyson (though no patch exists for it yet). At this point a lot of syntaxes
> are potentially viable (except single @, please don't suggest it).
I'd agree, I mentioned earlier that I'd preferred ranked choice over a 2-choice vote.
Unrelatedly, https://wiki.php.net/rfc/shorter_attribute_syntax_change
does not mention the drawbacks I've mentioned about significantly changing lexing in unexpected
ways (
#Attr('?>') will start inline HTML in php 7).
People reading the RFC might expect that #[ would only lead to missing tokens, not
significantly different tokens.
- https://externals.io/message/111218#111239
P.S. I don't plan to create a patch for attributes in comments due
to the long-term drawbacks for those writing tooling/editors for it,
difficulty to learn it, increased complexity of the implementation, etc.
I'd strongly prefer << and @@ over comments-based syntax.
That was more of "if language designers really, really wanted to write attributes syntax that
would be usable immediately and work with existing tools, ignoring various drawbacks elsewhere, then
what could they implement?"
I don't have objections to anyone attempting to implement it, but I'm not going to push
for it/work on it.
Cheers,
- Tyson