> $x = $y ? foo:bar:baz:stupid; I think "stupid" is the key word here, by forcing the whitespace or (), you are making the language itself stupid by not knowing how to parse itself. I'm not a core developer, but I am pretty sure that this implementation will never be accepted, so change your argument to something more agreeable (like no namespace constants) and it may have a better chance of acceptance or the alternative is to have \ the accepted delimeter for namespaces which we both agree is not the best solution. I don't think having namespace constants is reason enough for such an awkward syntax. Any core functionality that uses globals now that is moved to an object will require code modifications anyways, so I don't think thats a valid argument for the need of namespace constants.
Bob Silva > -----Original Message----- > From: Jessie Hernandez [mailto:[EMAIL PROTECTED] > Sent: Friday, November 25, 2005 8:37 PM > To: internals@lists.php.net; Oliver Grätz > Subject: Re: [PHP-DEV] Re: PHP 5.1 (Or How to break tousands of apps out > there) > > Hello Oliver, > > Oliver Grätz wrote: > > Marcus Boerger schrieb: > > > >>Hello Jessie, > >> > >> that's only one case,go with consts. now try > >>$x = $y ? foo:bar:baz:stupid; > > > > > > That's nonsense. If I as a programmer cannot comprehend what it should > > mean by looking at it then I shouldn't expect that from the language. > > To me, this looks like the constant stupid in the class baz of the > > subnamespace (?) bar of the namespace foo and the statement lacks the > > third parameter. Or well, should it...? The heck, let's put brackets. > > Ah! Now it's clear. And this is the moment where I would expect the > > language to understand it, too. > > > > OLLi > > Thank you!!! This is exactly what happens with my patch now in this > case, one constant named "foo:bar:baz:stupid" is parsed and a syntax > error is produced because of a missing colon and third argument. So, for > this to be interpreted right, a space must be added after "foo:bar" at > the very least (alternatively, use parentheses). This is simply a side > effect of the implementation, but it can actually be considered a > _feature_, since it promotes code clarity in this instance (again, this > only happens and is only required in this ONE instance). > > > Regards, > > Jessie > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php