Re: [RFC] [VOTE] PHP Attributes
| From: | Rowan Collins | Date: | Wed, 11 May 2016 09:37:53 +0000 |
| Subject: | Re: [RFC] [VOTE] PHP Attributes | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-93221@lists.php.net to get a copy of this message | ||
On 11/05/2016 05:46, Joe Watkins wrote:
I would not vote in favour of a patch that does not include support for AST, that's a completely different feature.Arguably, with the right choice of extension methods, an implementation requiring a single scalar could be extended to support arbitrary expressions later, since "scalar" is a subset of "expression". For instance, getAttributes() could provide a NULL value for any attribute with a non-scalar argument, and a separate getAttributesAST() could return an AST tree even if it consisted of a single constant. I'm still not convinced the freedom of AST is justified though, as opposed to a constant expression parsed according to standard PHP semantics (e.g. an associative array) or some specific syntax (effectively named parameters). I'd personally be against both options in the current RFC, because I think the language should be providing much more to make this useful. Regards, -- Rowan Collins [IMSoP]