Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113109 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 64627 invoked from network); 8 Feb 2021 14:58:49 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 Feb 2021 14:58:49 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 577A71804F4 for ; Mon, 8 Feb 2021 06:43:33 -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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,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 out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (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 ; Mon, 8 Feb 2021 06:43:32 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id EBA8B5C017F for ; Mon, 8 Feb 2021 09:43:31 -0500 (EST) Received: from imap8 ([10.202.2.58]) by compute4.internal (MEProxy); Mon, 08 Feb 2021 09:43:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=pVnyAf cutA/krXkDmirXfPIdb8AyLN+aOmqFVa4h3Wk=; b=wd162wUg7RBTxhVjldIp03 4okoR+fEwkzsHOicJ6/G1FR/94A0/hhQb9IU4oPmh+UaWvIzVLHdpdfv3SM4Fn3a ZUTayvMwhK+6EW2RHJLOrqypjwUjio+WXVtAx7QErSJ6CxStlLYvLy5K2HCQ7SB6 A4MSNLhqiZ+ZcmHt4TlixvySR+9QCKgkGTH9fgP9krweiDPwAG4qwWkJf0no/1Ui 9CXfG+cAj5yYJP58ZtBsSe35toyQW/NezLRRQ+yuajjxxG3NPguFb/5Ev8neWiOH SnpUsQXAwQoUuL77oxPkTWl+DY12GE4v/+5Kg4BXi1S+6NU1o6er+VU+xhlbontQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrheefgdeiiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgrrhhr hicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh eqnecuggftrfgrthhtvghrnhepveehhedvveejledvvefgleevffdtjeekledvkeegheff gfeivdejhffhledtudetnecuffhomhgrihhnpehphhhprdhnvghtnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgv lhguthgvtghhrdgtohhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 92C5D3A0074; Mon, 8 Feb 2021 09:43:31 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-93-gef6c4048e6-fm-20210128.002-gef6c4048 Mime-Version: 1.0 Message-ID: <77dfe9e5-a6d1-4a41-bceb-454a65cf34d0@www.fastmail.com> In-Reply-To: References: Date: Mon, 08 Feb 2021 08:43:11 -0600 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] [VOTE] PHP\iterable\any() and all() on iterables From: larry@garfieldtech.com ("Larry Garfield") On Mon, Feb 8, 2021, at 8:32 AM, tyson andre wrote: > Hi internals, > > Voting has started on https://wiki.php.net/rfc/any_all_on_iterable and > ends on 2021-02-22. > > This RFC proposes to add the functions `PHP\iterable\any(iterable > $input, ?callable $callback = null): bool` and `PHP\iterable\all(...)` > to PHP's standard library's function set, using the namespace preferred > in the previous straw poll. > > There is a primary vote on whether to add the functions, and a > secondary vote on the name to use within the `PHP\iterable` namespace. > > Thanks, > - Tyson > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php Ak! I literally just finished reading it and wanted to note a lack of clarity on one point. :-) The signature of the callback is never specified explicitly. The ternary is a bit confusing. I assume the signature is callable(mixed): bool But that's not made explicit. It's also not made explict that omitting the callable collapses to "is truthy". That's a sensible thing to do, but it's not stated explicitly anywhere, just inferred from the code sample. I'm not sure if it's safe to clarify at this point as the vote just started. --Larry Garfield