Re: [RFC] PHP Attributes

From: Date: Sat, 30 Apr 2016 11:44:24 +0000
Subject: Re: [RFC] PHP Attributes
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-92981@lists.php.net to get a copy of this message
On 4/25/2016 10:31 AM, Dmitry Stogov wrote: > completely disagree. > Each value in multi-value attribute may have its own meaning. e.g. > <<if(Condition,OnTrue,OnFalse)>> > That is a different example but I think that I misinterpreted it anyways. <<test(1,2)>> function foo() {} I thought that the above would result in the following: reflect foo => [ test => 1 test => 2 ] But I think in reality it results int: reflect foo => [ test => [ 1, 2 ] ] In case the latter is true, than everything is fine. :) On 4/25/2016 10:31 AM, Dmitry Stogov wrote: > You should try to implement this syntax to understand the problem. > It leads to parse conflicts. > The inclusion of the semicolon definitely does, yes. Usage of the @ should not but Stanislav already offered to jump in. I am not fit enough yet with the php-src to take up such a big challenge. On 4/25/2016 10:31 AM, Dmitry Stogov wrote: > This RFC is not going to propose coding standards. > Only talking about a standard for internal attributes, userland can and should do whatever they want. But we need to ensure consistency for internal attributes and that userland is not going to collide with internal ones. Currently the RFC does not include any attributes but many examples that others might use to deduce a coding standard and later we add internal attributes and things go south. -- Richard "Fleshgrinder" Fussenegger

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.internals (#92981) next »