Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113143 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 97333 invoked from network); 11 Feb 2021 17:37:49 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Feb 2021 17:37:49 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0ECAC1804D0 for ; Thu, 11 Feb 2021 09:23:21 -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=-0.2 required=5.0 tests=BAYES_20,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-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (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, 11 Feb 2021 09:23:20 -0800 (PST) Received: by mail-io1-f42.google.com with SMTP id s24so6483759iob.6 for ; Thu, 11 Feb 2021 09:23:20 -0800 (PST) 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=PhzVh6e1zFMJa722NM24sZlOhEK+3OIxe76MBKO3Xfg=; b=JbQF674PTsQ0YZthJBazBQogNTZQMpaGS5NtbIhnXpj8WDE9KlPnpHVhMWKY7M5lFQ 1HzWokgcgjqsT5u7SE+KMsM67v0IJgC74VVnI2RAkLwNEcEA0JcKxIJa3gg59PlUZCKM GAsLHZvqkm1oR6xlX/xGq/tDvKUlFE3vboihU= 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=PhzVh6e1zFMJa722NM24sZlOhEK+3OIxe76MBKO3Xfg=; b=f12JbX0bVH7b3hrAge3GMxb0m6QghXswKBA3FbfecKd/Fcq5Q3ccgaE5rF055dloVb 6nyXCS68tElmv9FRA/KSE/+vLjWwdnWEfwfggjkJLagkISrb+1lG7ZgmKf1F2Yyk9EG8 +34efWnquFWBs2IBe4tzr0ODAgRycFIJlX6v2zUhh3emBz54nznixjJUXeEh1Q8zpku3 kpN88OMY8nutTRyc76kvue8svZzwK+vfToQV5DGKPVU/T0EhblDxyCjm25xtSTCMdQQg UDuRU52skW9V/zbFCtjY9b9urtqVmeYyKVqUFS5U2jy6I58q/oiWI13SOJ+PPhkTjR+D jaEA== X-Gm-Message-State: AOAM530NZAzvIsXO2SO8YvxY/ORhaMEsCdn0pj3ijxJmKkupI2btsdCS abjdC33/kRAH045BeKbd6PjMq7TA8t7lgrl6f0wODY38JTU= X-Google-Smtp-Source: ABdhPJza+9AESZjW0faWf29e/INljWd7TPMqmiDtZ4PD/yqeaPA/k3PFRs0q0cB67R66QboOFgGfNI2OA0HQ/jXQuyM= X-Received: by 2002:a02:634b:: with SMTP id j72mr9611497jac.106.1613064197328; Thu, 11 Feb 2021 09:23:17 -0800 (PST) MIME-Version: 1.0 References: <60256200.1c69fb81.46e68.6437SMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: <60256200.1c69fb81.46e68.6437SMTPIN_ADDED_MISSING@mx.google.com> Reply-To: Levi Morrison Date: Thu, 11 Feb 2021 10:23:06 -0700 Message-ID: To: Mark Randall Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Re: Proposal: namespace the SPL From: internals@lists.php.net ("Levi Morrison via internals") On Thu, Feb 11, 2021 at 9:57 AM Mark Randall wrote: > > On 11/02/2021 16:39, Levi Morrison wrote: > > Let me know what you think. I am hopeful this approach will work because: > > 1. It is focused on a specific area which already has an established > > "namespace", but in name-only (not technically). > > 2. It does not try to solve the larger problem, which has a lot of > > disagreement. > > 3. I will be proposing new types for ext/spl soon (`ReverseIterator` > > and an array iterator that is more efficient than `\ArrayIterator`), > > and Tyson Andre has already proposed `CachedIterable` and company > > which is in `ext/spl`, so this space has active development. > > > > Thank you for your time. > > > > Do you want a dumping ground? Because this is how you create a dumping > ground :-) > > If we're going to start putting things into namespaces (and we should) > then we should absolutely avoid repeating the mistakes of the past by > dumping completely unrelated things together. I agree, which is the point of accepting things in a narrow scope. Data structures and iterators go hand-in-hand, as many iterator implementations are directly connected to the internal implementation details of the related data structure. There are other iterators, and as long as they are general purpose they are fine too. These things are related, not unrelated. > If SPL\ is to exist (and personally I think SPL is so cancerous, it > shouldn't) then IMO it must absolutely be SPL\iterators. As mentioned in the previous point, iterators and data structures belong together. It does not make sense to separate the implementation of FixedArray and its iterator into two different namespaces; they are one cohesive unit. Lastly, if we don't adopt a namespace soon, what will new names be? I can guarantee it will be something like `SplReverseIterator`, not `SplIteratorReverseIterator`. It won't be `SplDatastructureCachedIterable`, it would be something like `SplCachedIterable` (or `CachedIterable`, ugh). As you see, "Spl" _is_ the namespace. Any more or any less is incongruent with what we have. This is why I am hopeful that _specifically_ using "Spl" for these specific types can reach agreement; all we are changing is `Spl$thing` to `Spl\$thing`.