Hi everyone,

I have updated the RFC with much of the feedback received here, on Twitter
and Reddit.

https://wiki.php.net/rfc/attributes_v2

The following changes were made:

   - Changed to support the same attribute multiple times on the same
   declaration
   - Added support for attributes on method and function parameters
   - Replaced *PhpAttribute* interface with an attribute instead
   - Distinction between userland and compiler attributes and description
   when each of them gets evaluated/validated
   - Reduce number of examples to shorten RFC a bit and expand the other
   examples instead
   - Introduced validation of compiler attributes at compile time using a C
   callback
   - Offer alternative syntax “@:” using new token T_ATTRIBUTE which will
   be included with a secondary vote

You may have seen me mentioning that I don't want to deviate from the <<>>
syntax, a topic of heated debate. As Martin helped me tremendously with the
RFC and patches he earned to propose an alternative (including patch with
prototype). So we will have a secondary vote on syntax being either
<<Attribute>> or @:Attribute.

Let us know what you think about the changes.

greetings
Benjamin


On Mon, Mar 9, 2020 at 3:42 PM Benjamin Eberlei <kont...@beberlei.de> wrote:

> Hi all,
>
> I want to resurrect Dmitrys Attributes RFC that was rejected for 7.1 in
> 2016 with a few changes, incorporating feedback from the mailing list back
> then and from talking to previous no voters.
>
> The RFC is at https://wiki.php.net/rfc/attributes_v2
>
> A working patch is at https://github.com/beberlei/php-src/pull/2 though
> work around the details is still necessary.
>
> The RFC contains a section with common criticism and objections to
> attributes, and I hope to have collected and responded to a good amount
> already from previous discussions.
>
> There is also a fair amount of implementation detail still up for debate,
> which is noted in "Open Issues". I have pre-committed to one approach, but
> listed alternatives there. On these issues I am looking for your feedback.
>
> greetings
> Benjamin
>

Reply via email to