Re: namespace separator ideas

From: Date: Fri, 02 Dec 2005 05:05:57 +0000
Subject: Re: namespace separator ideas
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-20985@lists.php.net to get a copy of this message
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


« previous php.internals (#20985) next »