that if you try to "combine" two files that contain import statements,
it will be necessary to expand the imports.  Fortunately, since

What do you mean by "expand"?

import allows aliasing specific namespaced files and classes within a
file.  For example:

But import has nothing to do with files. import works on names, not files.

<?php
namespace foo {
class bar {}
}
import foo::bar;
namespace gronk {
class bar {}
}
?>

Fatal error: Class name 'bar' coflicts with import name

Ouch! So I can't actually combine namespaces from different areas - how I'm supposed to know when I write "gronk" that somebody is going to stick this code into the context that already has the name "bar" in it? It's exactly the problem namespaces are meant to solve! Moreover, if you take two files with working code and copy-paste them into one file, they have a lot of chance of stopping working. If this isn't confusion, I don't know what is.

That will clear up any possible confusion.

No, on the contrary - it would create a lot of confusion, since now you can break namespaced code with code outside namespace, which wasn't supposed to happen by definition.

Well it kind of makes namespaces behave more like namespaces, don't you

Please stop this "only C++ implementation is right" thing.
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

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

Reply via email to