Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98245 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57094 invoked from network); 7 Feb 2017 16:18:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Feb 2017 16:18:35 -0000 Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.68 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 74.125.82.68 mail-wm0-f68.google.com Received: from [74.125.82.68] ([74.125.82.68:33417] helo=mail-wm0-f68.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F5/6A-03389-953F9985 for ; Tue, 07 Feb 2017 11:18:34 -0500 Received: by mail-wm0-f68.google.com with SMTP id v77so29134129wmv.0 for ; Tue, 07 Feb 2017 08:18:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Lsq+gII6/pDowCQcVfgJKL5REMI6z3aV9cPdZ8usMyE=; b=gjfYr5IpQVKAydPG9JD7kerbVZLx71yFzB7aT9Q9frTr5vNaGWU+SGOjh66QB37dqV QpGbRqewYecswMlUM6FwkMGsAzoaevxRBEJMJvVwf4uzCgJZMYJ8RdN1CVEIc6PkbwQo 2ucmB7bwo16ApLHl6ARE6ZG7GfrMPmdicDIv+d0vOZVEE7VQedHhLDI15Qun1hSpnw52 YTB2ySEHLsHWh21IhU78+qDsrK9i+7YDzbU69rfnFHhNlimTfWZCOFeuOp5Hlq2S6a4T pXaUhAB0LcR+iocGLYtdxIauapBeOsYyC76Rh3ssBU0GdHm6AA/0skxTjFWB2M+sI7am wcAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Lsq+gII6/pDowCQcVfgJKL5REMI6z3aV9cPdZ8usMyE=; b=cn9gfjkQY2oWmhftWuGoUnyRzt+2Qbtrf7TBtVsHS2nxbNzK+YMCwL8neHKCCR/3k0 hBbUwDQgZzfUE7KK2W+ZblG9xeHoA8S2Icoiy/3HfYyHDzaX5Kwt/wND6L8WeXZSsbQk yExbzsgcICnuWLC8QZiMGf3HnvYE8FJvxdZ+1u6Du8gG4i5VAwuxajfiahqNSwMFgkfZ GwnG+kuWliyRKgjDWwLEmeKMANqCG/hMHuGdmwIX9qGFPS6anKmrqrgww0Pj08snuyh8 UJlNHb9m3mUe8r+ptgy4GlMX3QWlBc6kc3HTEuPe7fl3xlH5yOEz2JQwH1Yr55fylJaM QLpA== X-Gm-Message-State: AMke39k9tMD016G3xoummiCdnYwXSFnA3K3Ig63ODyCtR/oI1jl31ilhuyu0O5I2ducRyj/w8Cl4VkCf5YAJNw== X-Received: by 10.28.62.204 with SMTP id l195mr12822461wma.88.1486484310940; Tue, 07 Feb 2017 08:18:30 -0800 (PST) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.194.200.163 with HTTP; Tue, 7 Feb 2017 08:17:50 -0800 (PST) In-Reply-To: References: <459c6bef-8936-634a-9520-dbd65c35b7c7@fleshgrinder.com> Date: Tue, 7 Feb 2017 17:17:50 +0100 X-Google-Sender-Auth: NYXVcqnN_oKLqQQn1qxJ1cJ_WZM Message-ID: To: Derick Rethans Cc: Nikita Popov , PHP internals Content-Type: multipart/alternative; boundary=001a1148e3b4516ddd0547f31901 Subject: Re: [PHP-DEV] Namespaces in Core From: jpauli@php.net (Julien Pauli) --001a1148e3b4516ddd0547f31901 Content-Type: text/plain; charset=UTF-8 On Tue, Feb 7, 2017 at 12:00 PM, Derick Rethans wrote: > On Mon, 6 Feb 2017, Nikita Popov wrote: > > > On Mon, Feb 6, 2017 at 6:21 PM, Fleshgrinder > wrote: > > > > > First: I like namespaces in Core but here me out! > > > > > 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. > > > > Extensions which are not of this type should not live in the PHP > namespace, > > because they don't have anything specifically to do with php, apart from > > the circumstance that they happen to be bundled at the current point in > > time. Remember that extension may move from being bundled to being in > PECL > > and vice versa. If we decide to bundle the MongoDB extension with php, > > would we rename the currently used MongoDB namespace to PHP\MongoDB? If > we > > decided to move it back to PECL, would the namespace go back to just > > MongoDB? Or would it stay PHP\MongoDB, despite not being part of PHP > > anymore? Should all new extensions be written with a PHP namespace to > > account for the possibility of the extension being bundled with PHP at a > > later point in time (even if there are no concrete plans to do so)? > > > > I would answer No to these questions. The namespace MongoDB is not, as > you > > say, "random", it is *meaningful*. The namespace PHP is (with the > > exceptions in the first paragraph notwithstanding) meaningless and an > > artifact of the distribution mechanism, a mechanism which may change over > > time. > > I very much agree with all of this, and would like to add, that for a > *long* time it has been documented that PHP owns the top-level > namespace: > http://php.net/manual/en/userlandnaming.rules.php > > In any case, a discussion to namespace any existing PHP functionality > should really wait until PHP 8 - and that means, that if we decide to > put Sodium in PHP 7.x, it should not be namespaced out of consistenct > *no matter what the RFC result* says. > > I tend to agree with that. Every move its time. Namespacing PHP functions must wait for PHP 8. But with those ideas, there is a dilema : we are going to break PECL/Sodium users, as they now use namespaces (via PECL ext) and would need to use functions tomorrow, to use back again namespaces probably in several years .... Sounds not too good neither :-p Julien.Pauli --001a1148e3b4516ddd0547f31901--