Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99490 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72072 invoked from network); 10 Jun 2017 23:08:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jun 2017 23:08:54 -0000 Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 74.125.83.46 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 74.125.83.46 mail-pg0-f46.google.com Received: from [74.125.83.46] ([74.125.83.46:35207] helo=mail-pg0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F3/1A-01593-50C7C395 for ; Sat, 10 Jun 2017 19:08:54 -0400 Received: by mail-pg0-f46.google.com with SMTP id k71so35520699pgd.2 for ; Sat, 10 Jun 2017 16:08:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qGZP/aNh7dielUctwzoUcWbOWP8xzsO/xyH/+CA7n9Y=; b=T5Rin8o1bO3cQpO0V8nL3ICX21PCf6dNfU6aSn5GYrRpsyAmOD7acSI37CVtWX47h8 4gPgTkZzpgN0+x1vgvqVcwAgPe82DBtLNFLRs6ZMQMqV2y/mrRYJTjaD6vJejKcRMyEJ V8KJzJ7/IBTv5rPvmIdChAp8QcM2weL4Z7nw/HvHfSZ7S/duYB/84q9Y53fMnbddslHd 5Pl0z3U8Ub2iULXYNJBUEQmATzXcWxtXRY+oevG/cuk52w0is0JvejZ52TgEpeOiErQP tpAF0YZbcX4Tq7ZtLJUOISlRfRzWCrxYd+lfKPUBoJSl00/rGJkgtKIXpCHjH4jNxGVG xigw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qGZP/aNh7dielUctwzoUcWbOWP8xzsO/xyH/+CA7n9Y=; b=XaHKghPuhnVUrH4UKwIKss8YKmcEubF3A1L3bJD/+h6ySTxVHIMNDFSCQejBeYGuQt ztvPX/uiocvdeFOWPcKoKrIMoc2Q8Tzkek+0kKsFsDp3MQ1YwmIemzPaPBjBPHJJPiXv Dr0FLbJ5CrCs+l+aaZRLo67OsjEYfYxATUzvfuTn8NkIF4bQckje4gTXQUCS8NDKyoIR 52vehnf4UbSaK30gbt5s7UrQC+YU3hj8+UljROkkdfMgnLAMF4+oMmV5/QhInzhiJUI6 eA7qjWO9u3tou3wSIcSCk7FUU4i3AaYOr9dnjqIOCD1MLYvduN/UhRGt6QAljPqCRyQy hKOg== X-Gm-Message-State: AKS2vOy9cXASFKWOxU+Uz3Q0d8z+VHTy+riyKbJvb/FPeH1RDCMOdIt0 TrWsJBSmaYN4FKf8fFFYt///CkRy8CtK X-Received: by 10.84.241.197 with SMTP id t5mr2313522plm.48.1497136130816; Sat, 10 Jun 2017 16:08:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.168.4 with HTTP; Sat, 10 Jun 2017 16:08:50 -0700 (PDT) X-Originating-IP: [77.99.17.151] In-Reply-To: <3515b508-4571-0d57-6b47-616cae0b0908@fleshgrinder.com> References: <990f6d85-e3ed-05a4-42e0-d3a279c0ebe7@fleshgrinder.com> <277f53cd-0e79-6fcc-fa4b-b0527ca525b6@fleshgrinder.com> <3515b508-4571-0d57-6b47-616cae0b0908@fleshgrinder.com> Date: Sun, 11 Jun 2017 00:08:50 +0100 Message-ID: To: Fleshgrinder Cc: php-internals , Levi Morrison Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] [Discussion] Namespaces in Core From: danack@basereality.com (Dan Ackroyd) Hi 'Fleshgrinder', I object to this RFC on principle. RFC's are supposed to be opionated. They are supposed to present an argument for why we should do something, and why doing that is a good idea. This RFC does not do that; it presents a series of questions to vote on, without any clear presentation of what problem they are solving or why people should be vote for the RFC. Asking people to vote on things like this, leads to choice being made at random, when there may not even be a need to make a choice in the first place. These parts of the RFC are particularly lacking justification: > Allow plural nouns in namespaces? Yes/No > Use namespace for the language itself (in the future)? Yes/No > Name of the language namespace? core/lang > Use namespace for tiny self-encapsulated things (in the future)? Yes/No > Name of that namespace? std/util In addition, there are problems with other parts of the RFC. > Coding Standard? snake_case/PascalCase Shouldn't this be part of the other RFC? > This could help to avoid those 1,000+ LOC files Splitting files to only contain related things is a good idea. Splitting related things into separate files, just because some arbitrary line limit has been reached, is not. From the RFC: > Introduce namespaces to user-level symbols to avoid collisions with user defined symbols > > Use namespace for the language itself (in the future)? Yes/No > From email, Fleshgrinder wrote: > I personally do not like this approach. PHP is the vendor of these > things, thus, it should reside in the namespace of the vendor. Same > rules for everyone. If this is actually problem, a better solution might be just reserve the global namespace in addition to the 'PHP' namespace. However the RFC does not say why it is a problem that needs addressing, and so we cannot explore possible solutions. Multiple people have given you feedback that your idea of using a top level 'PHP' vendor namespace isn't a good match for the project. Rather than rephrasing what they have already said, I will just remind you of an earlier reply: From http://news.php.net/php.internals/98225 On 2/6/2017 9:47 PM, Nikita Popov 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. > > 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. cheers Dan Ack