Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113166 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 79861 invoked from network); 13 Feb 2021 16:39:23 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Feb 2021 16:39:23 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id ABF76180508 for ; Sat, 13 Feb 2021 08:25:24 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_50,KHOP_HELO_FCRDNS, SPF_HELO_NONE,SPF_NONE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from processus.org (ns366368.ip-94-23-14.eu [94.23.14.201]) (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 ; Sat, 13 Feb 2021 08:25:23 -0800 (PST) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by processus.org (Postfix) with ESMTPA id E90095101324 for ; Sat, 13 Feb 2021 16:25:21 +0000 (UTC) To: internals@lists.php.net References: <60256200.1c69fb81.46e68.6437SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <83fb79ae-13ff-09e7-83ac-3dcf4da4c3ad@processus.org> Date: Sat, 13 Feb 2021 17:25:20 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Authentication-Results: processus.org; auth=pass smtp.auth=pierre-php@processus.org smtp.mailfrom=pierre-php@processus.org X-Spamd-Bar: / Subject: Re: [PHP-DEV] Re: Proposal: namespace the SPL From: pierre-php@processus.org (Pierre) Le 11/02/2021 à 18:48, Chase Peeler a écrit : > I think Spl makes sense (there might be a debate over whether it should be > Spl or SPL though). How feasible is it to create generate a deprecation > notice when the global version is used? I assume the hope is to eventually > move away from using those, and I don't think that's a horrible BC break > given that users have enough time to prepare for it. Hello, For what it worth, I think that Spl is both ugly to read (yes, I like things not only to be semantic, but elegant as well) and hard to type on my keyboard (OK subjective point here, both are actually). "Spl" does mean somethings, but I'd prefer something more generic such as "std" or "standard" or "system", or even "stdlib". And it's an opinion, and we all have one. Even having lowercased namespace names for PHP standard library wouldn't bother me much: it would make it consistent in reading (e.g. `use std\array\first` for example, vs \array_first()` vs `use Spl\Array\first`). OK stupid point here, but fact is I don't really care, I just try to make a point here: we are free to invent new things, or get old things from other languages. We have all the possibilities of the world and beyond offering themselves to us, the only limit is our imagination. I disagree about narrow scope: if we / you don't think about the future, each narrow iteration will only get more and more inconsistent, each step will be a flame ware about naming, and no convention or consistency will emerge. And it will be slow. I will retire before I'll see an Array class or a `collection` namespace. And I'm not even that old! This will fatigue people, and kill any kind of good faith or good sense we still yet have. I think that namespacing, even if its implementation starts narrow (this make sense) should be thought thoroughly with a wider scope, with a global scheme even more. It should be voted with a complete view of what it will become, and how that makes stuff consistent across the whole actual and future SPL. I know this has not much chances to happen, because people always disagree for purely subjective reasons (beauty of names, ease of typing, semantic meaning of stuff, weird keyboard layout, or just because some people don't like when it's other people's ideas which get to be chosen or voted for) anyhow, I think that narrow scope will only gets PHP standard library farther from its goal than help it. This was my 2 cents, Best regards, -- Pierre