Re: [RFC] Shorter Attribute Syntax Change RFC 0.2
| From: | Côme Chilliet | Date: | Thu, 06 Aug 2020 07:17:49 +0000 |
| Subject: | Re: [RFC] Shorter Attribute Syntax Change RFC 0.2 | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-111350@lists.php.net to get a copy of this message | ||
Le Thu, 6 Aug 2020 07:48:05 +0100 (BST),
Derick Rethans <derick@php.net> a écrit :
> From the RFC:
> - No ending delimiter
As said before, it does have an ending delimiter when they are arguments since
there is the parenthesis around them. When there are no arguments I don’t see
the benefit of an ending delimiter, it’s easy to spot the end of the word.
> - Doesn't allow grouping
I do not understand this argument, what is the point of grouping for @@?
Does grouping mean anything special for other syntaxes, or is it just to save
keystrokes? If it is just to get a more concise syntax when there are several
attributes, the fact that @@ do not need grouping is a pro, not a con.
> - No forwards compat with PHP 7
But no BC break either, while #[] introduces BC break.
> - Not used ny another language
@ is used by a lot of other languages, and @@ is the closest we can get in PHP.
Côme