Re: Namespaces in Core

From: Date: Mon, 06 Feb 2017 21:38:34 +0000
Subject: Re: Namespaces in Core
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-98227@lists.php.net to get a copy of this message
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). If that makes sense, then that's another reason not to bring Sodium in as a namespaced library of functions. -Sara

« previous php.internals (#98227) next »