Re: solving the namespace conflict issues between function/staticmethod class constant/ns constant

From: Date: Mon, 22 Sep 2008 13:20:29 +0000
Subject: Re: solving the namespace conflict issues between function/staticmethod class constant/ns constant
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-40597@lists.php.net to get a copy of this message
Dmitry Stogov schreef:
Hi Greg, Greg Beaver wrote:
...
I really don't see a reason to change namespace syntax into a less intuitive way.
I don't think the current implementation is intuitive, the ambiguity issues, (and possibly the name resolution order, although I can't grok what the current state of that is) are rather large WTFs.
Your speed degradation argument isn't truth. The ambiguity problem exists, but it is just an ability to use php in a wrong way. Just don't create conflicting names.
which begs the question, what was namespaces created for? (that's a serious question because your statement has me truly confused) we can "Just not create conflicting names" without namespaces and Stas has mentioned numerous times that namespace were not designed just to avoid having to repeatedly type long symbol names. another thing, the ability to use php the wrong way is an argument that has been used lately both to: 1. advocate leaving functionality as it is and putting the burden of responsibility on the developer to do the right thing. 2. advocate changing functionality (or making the functionality illegal) in order to protect the user from doing something stupid. .. not exactly consistent. BTW, not creating conflicting names doesn't make the problem completely dissappear, code is still vulnerable breakage due to addition of new functions or classes in future version of the engine.
I would recommend option #1 (stay it as is + document)
It would seem that it's yours' and Stas' responsibility to properly document how namespaces should be used because everyone else either doesn't care much about it or has, according to you, completely the wrong end of the stick with regard to the how/why/what of namespaces. Can we at least count on you [both] to provide that documentation?

« previous php.internals (#40597) next »