Re: [RFC] Shorter Attribute Syntax Change RFC 0.2
| From: | Peter Bowyer | Date: | Thu, 06 Aug 2020 07:42:15 +0000 |
| Subject: | Re: [RFC] Shorter Attribute Syntax Change RFC 0.2 | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-111351@lists.php.net to get a copy of this message | ||
On Thu, 6 Aug 2020 at 08:18, Côme Chilliet <
come.chilliet@fusiondirectory.org> wrote:
> 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.
>
And if needed, make the parenthesis required. So @@Foo is illegal,
but @@Foo() is allowed.
Required parenthesis is familiar to most PHP programmers (functions,
classes following common coding conventions) - what's not to like?
Using "^" in the code demonstrations below as no one has proposed it and my
point isn't about #, << or @@ we get:
^Foo(
^Bar(43, "raa")
)
vs
^[Foo(
^[Bar(43, "raa")]
)]
To me the former is significantly more pleasant to read.
Is it difficult to parse?
Peter