Re: Re: namespace implementation (irritating warning and autoload)

From: Date: Sun, 06 Apr 2008 14:51:50 +0000
Subject: Re: Re: namespace implementation (irritating warning and autoload)
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-36820@lists.php.net to get a copy of this message
Hi,
This is a clear bug, please report it at bugs.php.net Done: http://bugs.php.net/44653
Since "use SomeName" does the same as "use ::SomeName" dropping the warning also be an option. And if we split of "use" into "use namespace" and "use class" we could resolve ambiguous calls where a namespace and a class have the same name in a way easy to understand. This would invalidate the reason for the warning IMO. Another benefit is that this way we know whether a unqualified call should resolve to a static method or a namespaced function and can save lookups at runtime. Furthermore if traits were added to PHP we can simply use "use trait TraitName". So there is no room for confusion because of keyword reuse. I think splitting of "use" was proposed on this list before but was never discussed. Regards, Julian Reich

« previous php.internals (#36820) next »