Re: Re: RFC: Dropping Namespace

From: Date: Wed, 05 Dec 2007 03:28:15 +0000
Subject: Re: Re: RFC: Dropping Namespace
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-33711@lists.php.net to get a copy of this message
I guess what I'm really asking is, 'is there any point in allowing import/use to be used in the global space?' I'm tired and etc, but I just can't visualize where it would be useful.
And now I've finished reading old South Park episodes... OK, it's sinking in now. Because global import/use is something you only have to type once, whereas you'd have to add the namespace declaration, the relevant includes and any specific imports from the global namespace on a per-file basis (unless that last is a bug in my ageing PHP copy). Sorry, I'm slower than the average glacier tonight :( Even so... if you want your code to be safe from potential naming collisions you'd need to do all that stuff _anyway_, so what's the point in having a quick and dirty way to be unsafe? What am I missing here? Surely if people don't want to utilize namespacing in their own code they should just stick with fully qualified names? I'm asking a lot of questions because I'd _like_ this to work, I just don't see it as working if it's possible to break a namespaced application with third-party changes. To me that's the main reason for having namespace support in the first place, and without it, namespace support is just a way to prettify names. I'd like wildcard support too... and support for multiple namespaces per file (for bundling only)... but neither of those are complete deal-breakers in my eyes. Protection from naming collisions, is. - Steph

« previous php.internals (#33711) next »