On Friday 04 July 2008 7:31:44 am Lars Strojny wrote: > Hi Johannes, > Alright, that's what my RFC was aiming for. Maybe from the wrong > direction. I wanted to do it exemplary for SPL and go on further for all > the other extensions we bundle in core. Namespacing everything is the > only way to reliably avoid collisions as the other option would be to > prefix anything except core. But what if we move an extension out of > core, should it be prefixed than? > > cu, Lars
If I may... From a userland perspective, the potential pitfall I see with namespacing PHP core stuff is that namespaces allow you to completely rename something. If you have to "use" something in order to use it, the odds are quite good of different people using different aliased names, even if they don't need to. I have worked with people who I am certain would do the following just to be difficult (or because they don't actually realize what a bad idea the following is): use Spl::Lists::Queue as MyFancyArray; $f = new MyFancyArray(); ... Naturally you can't prevent that for namespaced code without removing aliases, which is not an option, so some of that is going to happen anyway. But it would really really suck if I have to keep track of what PHP core/SPL classes or functions are in use in a given script not just by name but also by what this particular developer decided to alias them to because he was feeling lazy on a particular Friday last year. Doing that for userspace code will be challenging enough. :-) -- Larry Garfield [EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php