On 4 Aug 2014, at 20:41, Rowan Collins <rowan.coll...@gmail.com> wrote:

> > It does not permit dynamic references such as |&$classname::foo|, due to 
> > conflicts with existing syntax and for symmetry (while |&$classname::foo| 
> > would be doable, |&FooBar::$foo| is not, so we do neither).
> 
> I'm not entirely sure of the reasoning in the parentheses, actually. Do you 
> just mean that only the &FooBar::$foo case conflicts with existing logic?

Right, while &FooBar::$methodname would conflict, &$classname::foo would not. I 
do neither for the sake of consistency, as having one but not the other worse 
might cause confusion. This has the benefit, I suppose, that & is completely 
static. You can see at “compile-time” whether it’s valid and what function is 
being used. I think that would be good for static analysis. IMO, it’d also be 
good for Hack as it could use this instead of fun().
--
Andrea Faulds
http://ajf.me/





--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to