Re: [RFC] \PHP namespace usage heuristics
| From: | Mark Randall | Date: | Tue, 21 Jul 2020 00:36:17 +0000 |
| Subject: | Re: [RFC] \PHP namespace usage heuristics | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-111081@lists.php.net to get a copy of this message | ||
On 20/07/2020 16:58, Michael Wallner wrote:
Distilled down, I just cannot see any huge benefit out of a (or two) root namespace(s). As a project we rightfully own the root namespace, and putting everything beneath PHP just doesn't make any sense to me.You cannot just "own" the root namespace if you want to use namespaces yourself, which we will, it's inevitable, the number of classes and interfaces increases more and more each release. So either you fake namespaces e.g. PhpToken or you trample on userland \Tokenizer. There is one solution to this, and that is to have a vendor namespace for the PHP project itself, naturally the one that is reserved, \PHP. There's a very good reason modern language frameworks claim a couple of root level namespaces, e.g. .NET it's System.* and Microsoft.*, for Java it's java.*