Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112778 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 24875 invoked from network); 6 Jan 2021 15:03:37 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Jan 2021 15:03:37 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C6D2F1804DC for ; Wed, 6 Jan 2021 06:40:05 -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,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-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) (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 06:40:05 -0800 (PST) Received: by mail-il1-f174.google.com with SMTP id x15so3416842ilq.1 for ; Wed, 06 Jan 2021 06:40:05 -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=rlDQN+q638ljYCJN2W1OveaWF1VXoEln5G3mjW7qPec=; b=cBmbQWhv4adqHKcDPiOwtqOTsXPJEkf6+5MfvjkzNFm27xLgTZXQJn2snUdYXaw6aO Iyvi87B4KnhXBDGUNtNWQ1n5kZ56aSDJdGew7IqyCiy2VLYOZgdt6EWNtjpV5ylHp9e7 ktT9gcHxStqeGN357LAPmiFRKOOxQ31bxNGfc= 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=rlDQN+q638ljYCJN2W1OveaWF1VXoEln5G3mjW7qPec=; b=qAzFKavnAXfSPo5iPAZil3xgk3zek9iPtBYo2eKUeHzSaOPdNLdkucDEnQtpvKRQ5R y5w51yTUyD/KN4fZr4TAnUspDfMx8+kAJItIAK25BdoKUrwXKlrj8i1efG15EzWtUMgJ hRWvI0vY1RNz7w2xQZgulgv3Ch4ApbkJAw7AuDAmr7IogGRHXBbY4lc//CD7dhgV1DoP PC7ymVrv/0sob+YKrEzJ8cNduuAl1pl9XjJ36ljTirUheU4YtjlUQx1B9aNQ6xuegXvH mZuD6YLQ//telQTyGIBmYqiYbDZtpCyuLCYDmDUulcYvcKGvphJxu/KL60TpOAI/TX7z I2qQ== X-Gm-Message-State: AOAM530Z0BRVqol9P+AqbJLXqbrinKLSjbvHVlDFLsomb8pUC0QvQ6v5 86crKBDLtsAU/nRoc3yfC4mWnoP6WXWhQTwFUI9aCQ== X-Google-Smtp-Source: ABdhPJzUrOmcz+5IjExuomNFEllZjZNKMeoa3UDCgWjbhN/4AiuzYFkxxB+k+ClbbbsSiIm5LboxrRSswL5Fy4zlKyo= X-Received: by 2002:a05:6e02:1605:: with SMTP id t5mr4432131ilu.232.1609943999821; Wed, 06 Jan 2021 06:39:59 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Reply-To: Levi Morrison Date: Wed, 6 Jan 2021 07:39:49 -0700 Message-ID: To: Nikita Popov Cc: tyson andre , "internals@lists.php.net" Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Re: Straw poll: Naming for `*any()` and `*all()` on iterables From: internals@lists.php.net ("Levi Morrison via internals") On Wed, Jan 6, 2021 at 1:55 AM Nikita Popov wrote: > > 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 On the contrary, I'm happy to accept it into the SPL. I don't want the SPL to be a dumping ground for everything, but I specifically requested it to be an option for this vote.