Oliver,

Like I mentioned in another thread, ":" cannot be used, even if only classes are allowed in namespaces. Look at this example:

$x = $y?a:b::c();

The above can be parsed either as the first argument being "the result of method c of class b in namespace a" or the first argument being "the define named 'a' if true and the result of method c of the _unnamespaced_ class b". The only way to disambiguate is to force whitespace or force parentheses usage, but this would make the language inconsistent and confusing.


Regards,

Jessie

Oliver Grätz wrote:
Roman Ivanov schrieb:

Radical idea:
1) Use :.
2) Make : to work like ::.
3) Make : to work like ->.
4) But no one will agree to it anyway, so I stop here.


Nope. I agree ;-)
But that train has already left.
(although I still think : could be made to work for the namespaces)

OLLi

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

Reply via email to