Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112621 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 55267 invoked from network); 26 Dec 2020 17:28:19 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Dec 2020 17:28:19 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9270C1804E2 for ; Sat, 26 Dec 2020 09:02:03 -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,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.217]) (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 ; Sat, 26 Dec 2020 09:02:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1609002120; s=strato-dkim-0002; d=kelunik.com; h=Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References:From: Subject:Sender; bh=mzIRLD0I86y6p1nRH3gv2FWK5CM384oCXr8NuOcnIZY=; b=nDm3FbIEdVIIJGH6zcoPuXK9VUEptJYPbCyIdQelCI9m3IzEkMqKaGJ6ppjxYgC9bo T3ZI8PGjsJaCOMkA6GeAQMFX5+QIwUkAcMtr8gYxn3uH5NRJoJvMNc6a8lzinmW0B4DD 7iOb2hisp+9zFklbDoroNwutFy2f2oPDmxZZQko1QjzSSLJzFuwtCD6BwI4UDDvW7za9 bp8G0g8nrjPc9NyoffbeX5fVpVXYFcsP/yfPEtEaVQxZKlJlVdLS25gooxZ40oGTH9n2 9vrYDgyBgE6dqGb6ATQjcqbfU2/JAJwN0UHcPPKrpUQpzFfBvP6HXLQvuBVYxhBPM/DG 4Kcg== X-RZG-AUTH: ":IWkkfkWkbvHsXQGmRYmUo9mlsGbEv0XHBzMIJSS+jKTzde5mDb8AaBAcYiRB" X-RZG-CLASS-ID: mo00 Received: from mail-pj1-f53.google.com by smtp.strato.de (RZmta 47.10.7 AUTH) with ESMTPSA id i02580wBQH204cS (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Sat, 26 Dec 2020 18:02:00 +0100 (CET) Received: by mail-pj1-f53.google.com with SMTP id n3so3633960pjm.1 for ; Sat, 26 Dec 2020 09:02:00 -0800 (PST) X-Gm-Message-State: AOAM530cBMwjJW/53bSOI0X4z5geZ5fpfgsc+46WJ6pETT1T83246ltL dHb1RGitizZNFJg7co1lHELM3FVy1cotMkW2yQw= X-Google-Smtp-Source: ABdhPJzkTki46tTRJ3hVRXTWsQCkurIYt6HIPNvLAh9/kI2R6TTV+AirK1KUAdKOY1Ahb4Stidc8JkKltXx0cm0iLhE= X-Received: by 2002:a17:902:6a87:b029:da:e253:dd6a with SMTP id n7-20020a1709026a87b02900dae253dd6amr37153755plk.81.1609002119799; Sat, 26 Dec 2020 09:01:59 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 26 Dec 2020 17:59:58 +0100 X-Gmail-Original-Message-ID: Message-ID: To: Levi Morrison Cc: tyson andre , "internals@lists.php.net" Content-Type: multipart/alternative; boundary="000000000000cb298305b760ff88" Subject: Re: [PHP-DEV] Straw poll: Naming for `*any()` and `*all()` on iterables From: me@kelunik.com (Niklas Keller) --000000000000cb298305b760ff88 Content-Type: text/plain; charset="UTF-8" > > I want to re-iterate my opinion on this discussion thread: anything > with a prefix is a hard-no from me. Namespaces are literally designed > for this, and I will not vote "yes" to `iter_all`, `iterable_all`, > etc, no matter what the prefix is. Anything without a namespace is a > no from me. > > I'm flexible on many other points, but not this one. It's 2020 (almost > 2021); let's use namespaces for what they were designed for. This is a > perfect opportunity; they work on more than just arrays so using the > `array_` prefix for consistency doesn't apply. > Hey Levi, while I agree that namespaces were designed for this, I think `all` and `any` are too generic names, even in a namespace. I think Java's naming with any_match / all_match could be a good fit. If promises / futures make it into core in the future, there will be a need for an `any` / `all` function combining promises / futures. Maybe these should be named `array_*` and all array functions should be adjusted to work with iterators? Best, Niklas --000000000000cb298305b760ff88--