Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113144 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 369 invoked from network); 11 Feb 2021 18:03:07 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Feb 2021 18:03:07 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0130B1804DD for ; Thu, 11 Feb 2021 09:48:39 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, 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-ua1-f47.google.com (mail-ua1-f47.google.com [209.85.222.47]) (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:48:38 -0800 (PST) Received: by mail-ua1-f47.google.com with SMTP id t15so2009354ual.6 for ; Thu, 11 Feb 2021 09:48:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lyUdCeBm4igdJ2ADdq3NKv0Th5U47Lb88C3B1dvqwsE=; b=Ukd4N4hiuZENVa6Gf07FllRWMmB0svVBvWWibcCaE3mty5NFRjVIYaEvYflodqeBms v69GdRdoqM76U49c1QD3juaH2/RerSd0hloCo42v9aHf/8HgIadZJD0R4MUnthuEMr5E ciUKle47J15SCrR55hxebuB2ahPT8JLVtyylm+1mpaAwjVSwF76ie8+oyaOBYOBDNdmD SFETpJ8fUTzfNH+HcT0q5bDUELIS64o0+GNiYMxckMwF6XSWBsY82tuF++GVTj7PSym3 kxC6yB/kT1QuM0WXpt6VcH+OdEjRtg44aGF81pa8qxClK56D9WAveh/ZDF5CdRpI6GUW jJtA== 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=lyUdCeBm4igdJ2ADdq3NKv0Th5U47Lb88C3B1dvqwsE=; b=sNs5QLqGg+fYtjKeeDuWsMRGUSib08Si3qzv4Yg9/Z3ckV9XLJIJTt9cJ56L+UcbJV wB2pNkFKfgoRSWIT1RLTLEdoBzLN0+mgss/4pWpfb/l5mVrEkDnMwYOu+YatgBVymeMP chGgbHUSsEV4rJbQn5QS4bvljOtKP5fSr25OAX9RMFOTp3rp/YsG+o9cl4a53S+Zd3+5 pmoYLwjTTq4pGdDsWdpt2ToBiyClDYNyfBUIs+MgiTIm2ZOBLeTs4VlpP55FEHkiUygU tNgukeqsAf5cSXvlNfjZot+yiNk2iPmZTa8Dl+hkn3hF9sCQT9cx5zIXDtyZRACKtuaj ZlWQ== X-Gm-Message-State: AOAM533n6f36HxpPHExpi1Ld2RKl9QN7rZQ6quPTUrWU25TjHu3khx8Z bZjeBkYF6hdYH40qulTOmzVTyugpJa9ufQFTZZ4= X-Google-Smtp-Source: ABdhPJxns+c/LquKi4lU7ekWHDexjVbT6iRlP45oJVXJ00yeUYUFWfxJkv4Tabm+MRArY7x2pqsNJLoYE7ez870l8EQ= X-Received: by 2002:ab0:5f86:: with SMTP id b6mr5892745uaj.33.1613065716712; Thu, 11 Feb 2021 09:48:36 -0800 (PST) MIME-Version: 1.0 References: <60256200.1c69fb81.46e68.6437SMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: Date: Thu, 11 Feb 2021 12:48:25 -0500 Message-ID: To: Levi Morrison Cc: Mark Randall , PHP internals Content-Type: multipart/alternative; boundary="0000000000000b483f05bb132107" Subject: Re: [PHP-DEV] Re: Proposal: namespace the SPL From: chasepeeler@gmail.com (Chase Peeler) --0000000000000b483f05bb132107 Content-Type: text/plain; charset="UTF-8" On Thu, Feb 11, 2021 at 12:23 PM Levi Morrison via internals < internals@lists.php.net> wrote: > 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`. > > 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. > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > -- Chase Peeler chasepeeler@gmail.com --0000000000000b483f05bb132107--