Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113142 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 94696 invoked from network); 11 Feb 2021 17:11:46 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 11 Feb 2021 17:11:46 -0000 To: internals@lists.php.net References: Date: Thu, 11 Feb 2021 16:57:16 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Posted-By: 87.81.129.66 Subject: Re: Proposal: namespace the SPL From: marandall@php.net (Mark Randall) Message-ID: 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. If SPL\ is to exist (and personally I think SPL is so cancerous, it shouldn't) then IMO it must absolutely be SPL\iterators. Without that all we've done is swap one problem for another. The idea of putting data structures next to generic iterator helpers is, quite frankly, nuts. Mark Randall