Re: Desired namespace behavoir
| From: | Oliver Grätz | Date: | Thu, 01 Dec 2005 01:09:42 +0000 |
| Subject: | Re: Desired namespace behavoir | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-20927@lists.php.net to get a copy of this message | ||
Jessie Hernandez schrieb:
> Please explain what you mean.
Didn't you get my mail? OK, I'll put it in here:
---------------------------------------------------------
I already brought this up once: How difficult is it to introduce an
option to php.ini which has its standard setting in such a way that
every encountered namespace is automagically translated into "classic
prefixing" style?
Let's say: Mike doesn't want to use namespaces but he wants to use a
package from Jessie. Jessie uses namespaces. Mike has his PHP configured
to "auto-prefix-import" everything. So if he uses your file foo.php containg
namespace JessieStuff{ class Foo { ... } }
in conjunction with this setting would enable him to
require_once('foo.php');
$x=new JessieStuff_Foo();
This enables people who don't like namespaces to disregard them. No
import, no ::: and all the fresh fun when name collisions occur. Of
course, their code wouldn't be easily usable by those using namespaces,
but that's their problem not ours.
---------------------------------------------------------
This simply means automating the "as" option for EVERYTHING inside
namespaces for people that hate them.
OLLi