Re: [RFC] Attributes v2
| From: | Benjamin Eberlei | Date: | Mon, 09 Mar 2020 20:34:32 +0000 |
| Subject: | Re: [RFC] Attributes v2 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-108925@lists.php.net to get a copy of this message | ||
On Mon, Mar 9, 2020 at 8:35 PM Aleksander Machniak <alec@alec.pl> wrote:
> On 09.03.2020 15:42, Benjamin Eberlei wrote:
> > The RFC is at https://wiki.php.net/rfc/attributes_v2
>
> Would it make sense to support this:
>
> <<WithoutArgument>>
> <<SingleArgument(0)>>
> <<FewArguments('Hello', 'World')>>
> function foo() {}
>
> in this form:
>
> <<
> WithoutArgument; // comments allowed here
> SingleArgument(0);
> FewArguments('Hello', 'World');
> >>
> function foo() {}
>
> or if there's not many attributes, in the same line:
>
> <<WithoutArgument; SingleArgument(0)>>
>
> It may look better for the short version, but I'm not so sure about the
> long version.
>
Its certainly possible, the original Attributes v1 RFC supported both
syntaxes. I wanted to simplify it and opted for each attribute to have its
own <<>> enclosing. I have added it to the list of open issues to determine
what approach to take.
>
> --
> Aleksander Machniak
> Kolab Groupware Developer [https://kolab.org]
> Roundcube Webmail Developer [https://roundcube.net]
> ----------------------------------------------------
> PGP: 19359DC1 # Blog: https://kolabian.wordpress.com
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>