Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112773 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 92725 invoked from network); 6 Jan 2021 09:19:03 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Jan 2021 09:19:03 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EC81F1804DD for ; Wed, 6 Jan 2021 00:55:27 -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-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (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 ; Wed, 6 Jan 2021 00:55:27 -0800 (PST) Received: by mail-lf1-f52.google.com with SMTP id h22so4985989lfu.2 for ; Wed, 06 Jan 2021 00:55:27 -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=5bNpu/+cBlgVkW5aIhlXIU3XRvI3bxrvY7Ty0WedO2s=; b=EDU6uYqic4u0Zt1HeykZiv4FXqiolX9E76Y5OG9Uk4u1N+Nf6lGcXfJqY2FMmQtFYC KqZWO6stQxAVUBanMO1TMzEelKlxIb0KXOitaRkcjy5epYWSSU09sW0naAzo9NBkHijN VynDms8mkMTZ9mzib8c/s4iUGi+ccSLVDkWfhzKkcCy7jekY22/FqK7LSI+h3AkCvMqK RrYY6GmN4npLoRfYJw2aq1jaqs3Vizrp00fo+TBLi8x1LiQe+nqTK9mFa1CzhiGktu+N L6IZY0EwH7urThBvfVDhTYmO6mNb0gVhKuT8Y3FV/TfohsVFhbG//uW72rg52yyCYY2p eeJA== 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=5bNpu/+cBlgVkW5aIhlXIU3XRvI3bxrvY7Ty0WedO2s=; b=dOm5Bw1FUC5F9iuZGkdq01GqK1CJ66Y3+h9Rs0z5fgOFF0/ubAX3iP7Iyvi5XFOxrJ qcv8MELvSbEm9HJ0/eZ2e1C+oRUnXcexgwgqMhFKMZjWE0NMPxD3N60/eMSQ3V9xGtsc Dtq/Fv1b0/Gy0cXFXZv+IoEIX1uD/p3acrxZ2t4+HPZxpzMWQCmvwTNKgWu48E0B6v66 Jj1cHUbD7PQcriW3yBFHwXs4aKw+cuTHyRgqpWLK8GTk3rXTdCTbPCxVibTlW1tjexNM 7Q1K6mNRxv7wxTCeQ4Ji5RUVYPXBsGdhFN5Qd+pvt6PDRnq21SYkQ95/AKTyL8BefA+G nqEQ== X-Gm-Message-State: AOAM533gbrSxf1DJLTNwfDcH0ba5aPkqF2imHWE2BoRIegDwHlalMio6 o4194T0NDBKcD0+N/ftNYRukICewtGhxhwwhVek= X-Google-Smtp-Source: ABdhPJypdT1SUnzm4o5IHbfyJPqJRDgW1iUoHOQdqCNjK59v/M1Yy1P99M+YFgoG3rdv2BG5UqTDnQx+eW+M2s5IeSw= X-Received: by 2002:a2e:7e05:: with SMTP id z5mr1774132ljc.353.1609923323405; Wed, 06 Jan 2021 00:55:23 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 6 Jan 2021 09:55:07 +0100 Message-ID: To: tyson andre Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary="000000000000ceab3305b8377bae" Subject: Re: [PHP-DEV] Re: Straw poll: Naming for `*any()` and `*all()` on iterables From: nikita.ppv@gmail.com (Nikita Popov) --000000000000ceab3305b8377bae Content-Type: text/plain; charset="UTF-8" On Wed, Jan 6, 2021 at 2:28 AM tyson andre wrote: > Hi internals, > > > I've created a straw poll for the naming pattern to use for `*any()` and > `*all()` on iterables. > > https://wiki.php.net/rfc/any_all_on_iterable_straw_poll > > > > Background: The RFC https://wiki.php.net/rfc/any_all_on_iterable > proposes adding only two functions, > > but more functionality acting on iterables (array|Traversable) may be > added in the future, > > making it important to get feedback what people feel the best choice of > naming pattern would be > > to avoid inconsistency or name changes later on. > > (Many alternatives were suggested in the initial RFC announcement - > https://externals.io/message/111756) > > I've received more feedback than I expected from voters that were strongly > or moderately > in favor of putting new categories of functionality in namespaces. > > I've started a different straw poll and plan to start voting on that on > the 8th (this will be the last straw poll for iterable function naming for > this RFC) > https://wiki.php.net/rfc/any_all_on_iterable_straw_poll_namespace > > 1. I plan to propose additional internal functions for working with > iterables if this succeeds, > and would want to be sure this is the best name choice instead of just > an acceptable name choice going forwards. > 2. Additionally, this has been an opportunity for measuring overall > interest in adopting namespaces for brand new categories of functionality. > It can be argued that this is a new category of functionality because > existing methods work on Traversables (iterator_*) or arrays (array_*), but > generally not both. > (classes such as https://www.php.net/manual/en/class.ffi-cdata.php have > adopted namespaces, > but no global functions in php-src that I'm aware of have adopted > namespaces yet) > I'm happy to have these functions namespaced, but I'm not sure the suggestion to namespace them under Spl makes sense. This functionality has fairly little to do with the SPL as it is now and to be honest, by now there is quite a bit of ... stigma associated with functionality that resides in SPL. I would suggest using iterable\any and iterable\all as the names if we want to go down this route. iterable_any and iterable_all were the by far most popular choices on the previous poll, and these are just the namespaced variants thereof. Regards, Nikita --000000000000ceab3305b8377bae--