Read the purpose of both, which restrictions/limitations both have, how are they defined, how are they used, etc and you'll see if the current implementation is more like 'namespace' or 'package'. It's not related to package Java, namespace C, def, zendspace of whatever.
That's what I am trying to explain for a week now and still failing. Namespace as a concept is not the same as implementation of namespaces in C++ or Java. Packages as a concept is not the same as implementation of packages in Java, Perl, C or PHP. PHP is neither C++ not Java. Choosing which language to mimic - Java or C++ - is not the right way to think about the problem. PHP is separate language, not C++ or Java. Just because C++ has + and PHP has + doesn't mean PHP should have operator overloading. Just because PHP has multi-component names and Java has multi-component names doesn't mean namespace definition operator should be the same keyword. That's what I'm trying to explain - the choice is not "should we be like C++ or like Java". We may end up being like it - or not, but it is not the choice we have.
- Allow nested definitions namespace N1 { namespace SubN1 { ... } namespace Sub2N1 { ... } }
That most probably won't happen ever. If you want to know why, look up the nested class saga. In short - too much trouble to implement consistently, too bad runtime performance (unlimited lookup depth at runtime).
not in packages). You tell me 'namespace' are unique. I agree, but 3rdparty libraries using the name namespace alias will still mess the entire application. So let's follow bjori (IRC) idea and create the "filescope"!
I'm afraid I don't understand - what would filescope do? -- 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