Re: [VOTE] Shorter Attribute Syntax Change
| From: | Rowan Tommins | Date: | Tue, 11 Aug 2020 17:10:45 +0000 |
| Subject: | Re: [VOTE] Shorter Attribute Syntax Change | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-111483@lists.php.net to get a copy of this message | ||
On Tue, 11 Aug 2020 at 17:54, Theodore Brown <theodorejb@outlook.com> wrote:
>
> I think you may have misunderstood my point - it's not so much about
> the leading symbols but about grouping.
That sounds like a reason to vote No to grouping, which you already did:
https://wiki.php.net/rfc/attribute_amendments#group_statement_for_attributes1
> What will you grep for if you want to find all places where the Route
attribute is used (but not some other class named Route)?
With any syntax, you can't exclude other classes named Route which are also
being used as annotations. If you want things to be easy to tell apart,
don't call them the same thing.
If you specifically want annotations to stand out, name or alias all
annotations as "RouteAnnotation" or "ARoute" or something.
For that matter, just make a coding standard in your project to never use
grouped attributes, or always use fully-qualified names in attributes...
Regards,
--
Rowan Tommins
[IMSoP]