Re: Namespaces in Core
| From: | Derick Rethans | Date: | Tue, 07 Feb 2017 11:02:24 +0000 |
| Subject: | Re: Namespaces in Core | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-98240@lists.php.net to get a copy of this message | ||
On Mon, 6 Feb 2017, Sara Golemon wrote:
> On Mon, Feb 6, 2017 at 3:47 PM, Nikita Popov <nikita.ppv@gmail.com> wrote:
>
> > I'm strongly against use of the PHP namespace as a blanket namespace
> > for bundled PHP extensions. The PHP namespace should be used only
> > for functionality that is actually in some way related to PHP. For
> > example, the php-ast extension could reasonably be namespaced as
> > php\ast, as it provides an AST for PHP specifically. Similarly the
> > tokenizer extension could reasonably be namespaced as php\tokenizer.
> >
> Okay, I'm pickin' up what yer layin' down. Perhaps the question then
> should be asked in the other direction:
>
> Given PHP's long history and fanatical dedication to BC, should all
> bundled/core classes/functions/constants ALWAYS remain in the root
> namespace with a strong advisory to userspace libraries and
> applications to use vendor namespacing (which by and large, is
> precisely the status quo).
That would be my preference.
> If that makes sense, then that's another reason not to bring Sodium in
> as a namespaced library of functions.
Exactly my conclusion :-)
cheers,
Derick
--
https://derickrethans.nl | https://xdebug.org | https://dram.io
Like Xdebug? Consider a donation: https://xdebug.org/donate.php
twitter: @derickr and @xdebug