Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111767 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 51581 invoked from network); 1 Sep 2020 21:36:32 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Sep 2020 21:36:32 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 185DA1804D4 for ; Tue, 1 Sep 2020 13:41:16 -0700 (PDT) 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, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (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 ; Tue, 1 Sep 2020 13:41:15 -0700 (PDT) Received: by mail-ej1-f46.google.com with SMTP id p9so3563855ejf.6 for ; Tue, 01 Sep 2020 13:41:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=vs87hAY4c8Z4OqyxTnPB9bqtHRLnUzTYoLLKLIdxzWA=; b=TcSS2PcWmTueOKlUmGPfNDZpvXVVTgoUg8bbNPYLeihKc8mQagouCSfGqGjkdJnSrO O+9bAzsLrtJO9V43yOcQPHgEQWXzlxu4r/heWBUd9MO7UizI3zGv5XYFb2+VlKJmGIwe LzltM44RGyHbpssOG1BqjjC7tEyRaBZGM4s8e08VNNBAn4b/95bfC519/lrzT+1qopqs 7ewhykOVJo+JSQp0AwDMnaE13wCfEKuLYOj8kYCt+eL7BWlQYBarpeo9KLaui+Q6ccL+ nAIn5Jjk5NozIIF+eV3J4A37G0IFSjs4KKHBxd3Wp04T3AWGsvewyuWeWcdsBFcs7CBD tl8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vs87hAY4c8Z4OqyxTnPB9bqtHRLnUzTYoLLKLIdxzWA=; b=fMbJUlV/gIFm+GW/Bodzx3dWY7PFFXaIfFTm1bX4ulktlqtVaIjoEVWJM6CBSMYzRm 8P5Wo7aoDGlynNBHcMEr8IgXoHmez6bYexCY0TXfMfr+evJ3mr+nnHLn/yoz6nAiX38k 83dm5WOowyI5nCyTzOnSgT+eXGcoXglH0C0UYruXzLn152asrll76L1Mv79Qyr3TY8CM nMPCH112Vmm2pN/XCVz3R+mf71Qr8FMpcC8kOYTrdZiRzppFGqk/JFAKP3O8+6W84Y2Y Tt7JyNoj1SEjrq20ye8qhmEYWC56mlL7RT58hdCOfRhQ3zj/9rjGO4XCbG4sM7SxNRIA K7Qw== X-Gm-Message-State: AOAM531V77dFx2lGg5sxIw0VBQMfSOgWthceWPOQkzgR8974a7Hoqyyr tuAoX2PlfDPtzQTbxwVOnwFlmuTXrQ9vcA== X-Google-Smtp-Source: ABdhPJxiHdKhIB3z46Sq9+KGV1Ndhy+PiCbQ99kb5AlaweYiIyyypMGHATQevj6XiTIg/j35CU6s6w== X-Received: by 2002:a17:906:b74a:: with SMTP id fx10mr3208269ejb.232.1598992869408; Tue, 01 Sep 2020 13:41:09 -0700 (PDT) Received: from ?IPv6:2001:983:6fc5:1:49c7:735:8c90:b4f5? ([2001:983:6fc5:1:49c7:735:8c90:b4f5]) by smtp.gmail.com with ESMTPSA id z5sm2133797ejm.111.2020.09.01.13.41.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Sep 2020 13:41:08 -0700 (PDT) To: Nikita Popov , tyson andre Cc: PHP internals References: Message-ID: <4792c245-ceda-d953-f844-ba26e02dc548@gmail.com> Date: Tue, 1 Sep 2020 22:41:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Global functions any() and all() on iterables From: dik.takken@gmail.com (Dik Takken) On 01-09-2020 09:30, Nikita Popov wrote: > To be in line with naming conventions, I would suggest calling these > iter_any() and iter_all(), using iter_* as the prefix for our future > additions to the "functions that work on arbitrary iterables" space. > iterable_any() and iterable_all() would work as well, though are > unnecessarily verbose. It would make a lot of sense if we end up having a set of array_* functions and a set of iter_* functions. It would be nice for the RFC to mention this as a possible future result. However I am equally tempted to reason otherwise: Since the new functions are generalizations of functions which only work for arrays, strip the array_ prefixes off the existing array functions to create a set of generalized counterparts. It does yield nice short function names. :) Also, it would not surprise me if the generalized functions gradually replace the good old array functions in the future. When that happens, I would rather not have the iter_ prefixes. Regards, Dik Takken