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] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php