Re: my last attempt at sanity with namespaces
| From: | Greg Beaver | Date: | Thu, 16 Oct 2008 22:07:51 +0000 |
| Subject: | Re: my last attempt at sanity with namespaces | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-41169@lists.php.net to get a copy of this message | ||
Chris Stockton wrote:
> I have been watching the namespace conversations for months and I can not
> get my head around this fixation on a new separator. Other languages get by
> without separate resolution syntax, why not solve these ambiguities through
> rules of precedence like everyone else? Throw possible ambiguity warnings if
> we don't mind looking ahead for the performance hit and give users the
> ability to alias their namespaces with AS when conflicts do occur they can
> be easily fixed.
> using BadNamedLib as BetterNamedLib;
> using BadNamedLib;
>
> Resolve using :: as a separator, have some simple rules and document them,
> first namespace's loaded classes takes precedence over the last. Constansts
> are more important then classes, or vice versa. Document the determined
> precedence. Giving users a tool to alias namespaces solves a lot of the
> namespace resolution issues.
Hi Chris,
This is actually option #3 on the list of solutions at
http://wiki.php.net/rfc/namespaceissues
Steph: can you catalog this as a vote for it?
Greg