Hi Stas,

If you have two distinct sets of code, why you use same namespace for both of them? Namespaces are specifically designed so you could have different sets of code in different places.

I was unclear there, sorry. I was thinking of the situation where 'I use a class that happens to have the same name as the namespace in a third-party lib I need to use in my application'.

nb Stas - I asked the same question about warnings, Greg updated his proposal since then to answer it.

As it is now, every call to class::method() not accompanied with use should produce E_WARNING.

? That's certainly not how I read it.

I do not think it is an acceptable situation - this would make code migration a nightmare, since even if you never use functions and never even have any chance for a conflict, you still have to insert hundreds of imports into your code, just to shut up the warnings. I don't think it is a good idea. Feature that you do not need, can not disable and have to work around is called "bug".

Can we double-check this?

- Steph

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

Reply via email to