On Mon, 1 Jun 2020 at 00:48, Theodore Brown <theodor...@outlook.com> wrote:

>
> Having a distinct token for attributes would entirely avoid the issues
> of having to modify multiple lines when adding/removing attributes, as
> well as confusion with shift operators and comma-separated attribute
> arguments. E.g. the RFC example would look like this instead:
>
> ```php
> @@Attr2("foo")
> @@Attr2("bar")
> public function test()
> {
> }
> ```
>


I'm not sure what you mean by "having a distinct token"; the cases where
there is any chance of confusion with bit-shifts are going to be very rare,
and aren't related to any of the other issues you're discussing. You make
some good points about not having comma-separated attributes, but they
don't require us to change the syntax, just not add that feature to it.

On a personal note, I find @@ a lot uglier than << and think a bracket-link
syntax looks clearer when writing multiple attributes on one line to avoid
long thin columns of code:

<<Attr2("foo")>> <<Attr2("bar")>>
public function test()
{
}

vs

@@Attr2("foo") @@Attr2("bar")
public function test()
{
}

Regards,
-- 
Rowan Tommins
[IMSoP]

Reply via email to