On Sat, Aug 15, 2020 at 11:47 PM Jakob Givoni <ja...@givoni.dk> wrote:

> This will probably be my only contribution to this thread so I'll keep
> it simple:
>
> Am I in favor of a revote? Yes
> Can I vote myself? No
> Do I think a revote will change anything? No
> Have there been any good arguments for why attributes need an ending
> delimiter? No
>
> The RFC says that
> > The main concern is that @@ has no ending symbol and it's inconsistent
> with the language
> > that it would be the only declaration or statement in the whole language
> that has no ending termination symbol.
> However, it's clear that attributes are neither a declaration nor a
> statement, but metadata about the thing that follows them (unless it's
> more attributes or comments).
> The ultimate proof of this is that a semicolon after an attribute is
> illegal.
>

I would like to chime in here since this argument is made over and over
again, even though it overlooks an important point. when we say that
attributes are just metadata, then let's compare them to docblocks with
*are* always enclosed in /** and */ instead of visibility keywords.

This comparison is fair, because doc comments are often multi line and
attributes are as well. When doc comments are single line, they are also
enclosed.

Whereas a comparison with visibility modifiers that are *just* tokens that
*always* are followed by a T_WHITESPACE is apples vs oranges, because @@
attributes can be followed by a large set of different things:

@@Foo @@Bar // ends due to T_WHITESPACE with " "
 @@Foo // ends due to T_WHITESPACE with "\n"
 @@Foo() // ends due to )
 @@Foo () // ends with ), the T_WHITESPACE between class and arguments is
valid
 @@Foo@@Bar // ends due to new T_ATTRIBUTE
 @@Foo()@@Bar // ends due to )
 @@Foo
 ("bar") // ends here in the second line at )
 function a_function() {
 }

We are working to integrate our arguments in favour of enclosing from that
Derick and I made in this and the previous thread into the RFC at the
moment, as the lack of them is a valid point of criticism.

Additionally, Derick and I are waiting for word from Sara and Gabriel at
the moment, but we suggested to close and reset the vote to wait until the
discussion period is over on Tuesday to accommodate the criticism of us
prematurely starting the vote (by accident, not intentionally). We will
take the time to update the RFC with all discussions from here and the
previous thread with arguments that have come up.


> Do I think attributes need an ending delimiter? No
> Would I prefer the @@ syntax? Yes
> Do I think @@ is ugly or difficult to type? No
> Is it just a subjective matter of personal taste? Yes
> Is this whole discussion almost entirely a subjective matter? Yes
> Is this email thread, the RFC, the voting and the discussion about
> extending it a farce? Yes
> Do I mind waiting until 8.1 to have attributes so that it can be done
> right? No
>
> Godspeed!
>
> Best, Jakob
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: https://www.php.net/unsub.php
>
>

Reply via email to