On Fri, 1 Jun 2012 15:56:59 +0200, Nikita Popov wrote:
On Fri, Jun 1, 2012 at 9:57 AM, Gustavo Lopes <glo...@nebm.ist.utl.pt> wrote:
We currently don't use namespaces in any of the core extensions.
Does anything prevent us from starting to do so?

other symbols in ext/intl are in the global namespace; to put BreakIterator in a new namespace would be inconsistent -- and to put the whole extension
would be a huge BC break.
It sure would be a bit inconcistent, but if you see it as "All new
Intl classes will go into the Intl namespace" it makes perfect sense in my eyes.

You say that it makes perfect sense, but you don't explain why.

Also, at least in theory, one could alias all intl classes to namespaced variants
(though I'm not sure that's really necessary.)

Yes, that would be the only sane way to do it, but I really don't see a benefit large enough to compensate having a different treatment for classes depending on some arbitrary line like when they were added. The only real benefit of namespaces is to avoid name collisions, but most new projects use namespaces and we can easily avoid name collisions in the PHP core.

Plus, remember ext/intl is maintained in PECL too, where it supports PHP 5.2.

Anyway, this is getting a bit off-topic.

--
Gustavo Lopes

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

Reply via email to