Re: BreakIterator
| From: | Gustavo Lopes | Date: | Fri, 01 Jun 2012 14:55:36 +0000 |
| Subject: | Re: BreakIterator | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-60714@lists.php.net to get a copy of this message | ||
On Fri, 1 Jun 2012 15:56:59 +0200, Nikita Popov wrote:
On Fri, Jun 1, 2012 at 9:57 AM, Gustavo Lopes <glopes@nebm.ist.utl.pt> wrote:You say that it makes perfect sense, but you don't explain why.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.
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