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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to