Re: Question about Namespace patch

From: Date: Mon, 23 Jul 2007 17:13:26 +0000
Subject: Re: Question about Namespace patch
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-31215@lists.php.net to get a copy of this message
Stanislav Malyshev wrote: > > Because I just want those names directly available in one part of my > > application - the one which uses a lot of SQL. As far as I see this is > > not > > If you want names to be part of global space - don't use namespaces. > Namespaces are meant to take names OUT of global space. Once again. I do not want classes/function from ORM lib to clutter my global namespace everywhere. I just want everything from it to be available in couple of files (where lots of SQL/mapping) is going to be used. In those few files I'll be able to keep control of names and avoid conflicts. Sure, I can prefix all the names or insert a bunch of imports, although it'll just be ugly. And about "not using namespaces" - there are such things as code libraries. Those will probalby be namespaced - so I'll be using namespaces even in small scripts - just because I'll be using those libs. If using a bunch of imports is the only way that is accepted - then at least a shortcut like python's "from x import a,b,c,d,e,f,g,h" would be a nice. -- Paweł Stradomski

« previous php.internals (#31215) next »