Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111055 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 47095 invoked from network); 17 Jul 2020 03:05:39 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Jul 2020 03:05:39 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B8C081804D2 for ; Thu, 16 Jul 2020 18:58:42 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 16 Jul 2020 18:58:42 -0700 (PDT) Received: by mail-io1-f50.google.com with SMTP id v6so8679112iob.4 for ; Thu, 16 Jul 2020 18:58:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datadoghq.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RYbM7zYvY/NoqCuKLfus3MFCUpCUC6wpt4oItpf0h0I=; b=IcJQ9ldHDYJ7jOSJkkawq+mQ39XgPqsECk8AsNbI6JKlycAfetL1Vi8wwVu9jQL79c 4LiVztaY0/8dPNSbu2WDBDcVOd7YH/3mN2Huag1iB3Jpnmk70TPkRX/NcHLVU/9iu5Gg uqPal8QdND/F+PI1o8/sPMTZvC4LDJ6j6osDo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RYbM7zYvY/NoqCuKLfus3MFCUpCUC6wpt4oItpf0h0I=; b=nUv3Eo+OJXEvvfRiZwXuz9NuSbvyZULytfsYvLY+dvsDzUR5A4vsNi6/7V42hlD7JC J6LA7WCbUMLq+2sAHMRHIUOyle2o4S5qo+VB94/EfL0QbqnCFY+lxXITJslV5Y9yMJgb bI5jhrcY5/Mt8Pv4zritkiO9mgpPr9y2DUs4dRTdVFuHAnOaGLLKlHUYoBQvTmYHK7/s Di9tOLUEVNVZZm0MI9eFCZMcVXq4CsJ6hokkXJi56AUF2WcQDuLf+RbFC6YJTp7BjM6B tqpyw0gh2vcAqYtCA4xQGQfypHOshk/p5tHPb7u46ZlZpP7YTN8wozkhyc0O5i0Mk4zj UDNA== X-Gm-Message-State: AOAM531EeD1qSoFQcFNW9HDbs7ddZSR4OvgDd9CMSdTLfd81nwPT6Mze FuCpvpUtOHar6zCNMDGMXLC+b4bpLil9GDFs8JwVxjYpK50= X-Google-Smtp-Source: ABdhPJyoxXo52Kr9zk8sXofwInyqWwLPI4Ek6dPgcy4xym3ftfOIW+ido4S5DlX5zX8Ai5Up4yscXQ8bYIj9JwTaAf0= X-Received: by 2002:a6b:b78d:: with SMTP id h135mr7377005iof.151.1594951118492; Thu, 16 Jul 2020 18:58:38 -0700 (PDT) MIME-Version: 1.0 References: <0771c3ac-53ec-4a7f-a4e9-6ae3c9b1f1f6@www.fastmail.com> <49fd7972-8cec-4207-99af-6c77c2328211@www.fastmail.com> <02b8e816-1f75-48b4-9614-cec236f6bcec@www.fastmail.com> In-Reply-To: <02b8e816-1f75-48b4-9614-cec236f6bcec@www.fastmail.com> Reply-To: Levi Morrison Date: Thu, 16 Jul 2020 19:58:27 -0600 Message-ID: To: Larry Garfield Cc: php internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] \PHP namespace usage heuristics From: internals@lists.php.net ("Levi Morrison via internals") On Thu, Jul 16, 2020 at 3:42 PM Larry Garfield wrote: > > After some discussion, the namespacing proposal has been again updated. Two major changes: > > 1) Only engine code goes in \PHP. There's a separate \Ext namespace for extensions, whether bundled or PECL. > > 2) It establishes that an index will be maintained on the Wiki listing what namespaces are already claimed. > > https://wiki.php.net/rfc/php_namespace_policy > > This is probably (I hope) the final edit of consequence before voting. Speak now or forever hold your peace. :-) Chiming in to formally oppose `\Ext`. I don't think it holds much value for a few reasons: 1. If all extensions are in the same namespace then they have to work out conflicts between themselves anyway. This would not have helped mongo and mongodb, for instance, nor memcache and memcached. 2. I don't think this is solving any problems, really: - Code can move from PHP land to an extension and back again. Should the namespace change just because it moved one way or the other? I vote no. - It's more typing for... what gain, exactly? I'm strongly in the "make namespace short and flat" camp. Deeply nested namespaces make more sense when you need to distinguish between projects within a company, for a contrived example `Amazon\WebServices\SDK`. I can see there being multiple projects with Amazon, and I can see there being multiple WebServices projects. Removing a namespace segment doesn't make a lot of sense either, except for perhaps collapsing the first two to `AWS` but this is just another point to my short and flat camp. This deeply nested company organization is not the territory we are in as a project, so we should keep it simple and keep our namespace short and simple.