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
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to