Re: [VOTE] Shorter Attribute Syntax Change
| From: | Benjamin Morel | Date: | Tue, 18 Aug 2020 12:39:31 +0000 |
| Subject: | Re: [VOTE] Shorter Attribute Syntax Change | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-111610@lists.php.net to get a copy of this message | ||
On Tue, 18 Aug 2020 at 08:49, Aleksander Machniak <alec@alec.pl> wrote:
>
> I wonder why my suggestion (somewhere in this thread) didn't get any
> attention. Is it because the ship had sailed or it's a terrible idea?
>
> declare(
> SomeAttr,
> AnotherAttr("Hello world")
> )
> function someFunc() {
> }
>
This syntax has its benefits, but IMHO looks a bit clumsy for simple
annotations, and does not make it stand out as an annotation to my eyes:
declare(Inject)
class Foo {
}
But this may be just me.
— Benjamin