Re: Re: [RFC] Attributes v2

From: Date: Fri, 17 Apr 2020 17:14:32 +0000
Subject: Re: Re: [RFC] Attributes v2
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-109696@lists.php.net to get a copy of this message
On Fri, 17 Apr 2020 at 17:11, Theodore Brown <theodorejb@outlook.com> wrote: > Consider this example using the shift left/right token syntax: > > ```php > <<BitShiftExample(4 >> 1, 4 << 1)>><<OtherAttribute(4 >> 1, > 4 << 1)>> > function foo() {} > ``` > > To me the same thing using the T_ATTRIBUTE syntax is far more readable: > > ```php > @:BitShiftExample(4 >> 1, 4 << 1) > @:OtherAttribute(4 >> 1, 4 << 1) > function foo() {} > ``` > This is an interesting point, but how often are users likely to write anything like that? Perhaps part of the reason I'm less bothered by the angle-bracket syntax than others is that I can count the number of times I've used bit shifts on the fingers of one hand, so I don't read it as "reusing the left/right shift token", I read it as "enclosed in double angle brackets". Regards, -- Rowan Tommins [IMSoP]

« previous php.internals (#109696) next »