Re: phpnamespaces.org!

From: Date: Fri, 02 Dec 2005 00:30:53 +0000
Subject: Re: phpnamespaces.org!
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-20981@lists.php.net to get a copy of this message
hi, personally, I find :::A, ::A and such constructs *extremely* ugly. Might I suggest using a special keyword to denote global scoped classes? eg: global:::A and such. global already is a keyword, but I'm pretty sure it could be reused in this context. Plus, it clearly shows where you're getting it all from. - tul Jessie Hernandez wrote:
Hi l0t3k, Yes, this is how it's done in C++, but do we want to allow this syntax for PHP? If so, it'll either be :::A, ::A (can be used, but might be inconsistent as ":::" is used everywhere else), or \A, depending on the final separator... Regards, Jessie ""l0t3k"" <cshmoove@hotmail.com> wrote in message news:E9.1A.14828.54A2F834@pb1.pair.com...
""Jessie Hernandez"" <jrhernandez05@gmail.com> wrote in message news:FE.F6.14828.BA52F834@pb1.pair.com...
2) How will symbols be resolved inside namespaces? If a class "A" exists in namespace "N", and a global class "A" also exists, then by referencing "A", what should happen? Should the namespaced "A" be used? If so, then the global "A" cannot be accessed from the namespace. Is this OK? These
rules
would need to be the same and affects the following contexts:
i should know this, but does PHP use :: as the global scope resolver as
in
C++ ? if so,
namespaced A    ==>    $A
global A              ==>  ::$A
l0t3k


« previous php.internals (#20981) next »