On Thu, 9 Jul 2020 at 18:14, Derick Rethans <der...@php.net> wrote:

> On Thu, 9 Jul 2020, Rowan Tommins wrote:
>
> > And yet we have repeatedly had discussions about whether this or that
> > feature should or shouldn't be prefixed with a namespace. If you think
> > the correct answer to "when should we use the PHP\ prefix?" is
> > "never", I urge you to put forward an RFC making that the policy.
>
> That is already the policy:
> https://www.php.net/manual/en/userlandnaming.rules.php
>
> Specifically "PHP owns the top-level namespace but tries to find decent
> descriptive names and avoid any obvious clashes"
>


That is not the same thing at all. That states that PHP may use the global
namespace; it doesn't say it will never use any other namespace.

And https://www.php.net/manual/en/language.namespaces.rationale.php says
essentially the same thing about the PHP\* namespace:

> The Namespace name *PHP*, and compound names starting with this name
(like *PHP\Classes*) are reserved for internal language use and should not
be used in the userspace code.


At the very least, it is not universally accepted that the policy is never
to use the PHP namespace, or we wouldn't keep having this conversation.

So, again, if anyone thinks that the policy should be to never use the PHP\
namespace prefix, please put it to a vote. (I'm quite tempted to do it
myself from a position of Devil's Advocate.)


Regards,
-- 
Rowan Tommins
[IMSoP]

Reply via email to