Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113121 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 29702 invoked from network); 9 Feb 2021 00:53:03 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Feb 2021 00:53:03 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8327B1804D1 for ; Mon, 8 Feb 2021 16:37:53 -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=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, 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-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (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 16:37:53 -0800 (PST) Received: by mail-ed1-f42.google.com with SMTP id s5so21442004edw.8 for ; Mon, 08 Feb 2021 16:37:53 -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=+y+xkCl5aCb6U/pA+0IVTzfs/Ntcr89DL4A1LvxLjkg=; b=EtWs+amE6XFb/j3Oj+Yybo574x6gIkdqI2b2cYVdzQmpJce5wQK5f4FLbIhiSAregT wCEFQWJ6BLijBOVQ8hXMHFoQPxG8r90MRztnxox7k4RlJW/PRQx0qpbKfmePfZ4x7QK6 QpLPqkBDPqpUOWnOdd1T1eHzSzZNCBuPk7Jv/H7+BSxuj85JIHLEePPH464cV7DMRyS6 iIBbTm32JPTxtCGJsMHJM33lA3A+GyxBEEwRPga1amNemAI0pLwLXCl5JBAjJEyuHSab UbZKLOCO15umem7rxqStAJ6+qdY6NO9ASIEsIOBDy+aZYfrSLHbFDu/FNyslFmCoWkVN C8lQ== 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=+y+xkCl5aCb6U/pA+0IVTzfs/Ntcr89DL4A1LvxLjkg=; b=RKsqnMR/PM236PjzvUTktiVwldZrUSFCynQaRWwxC4EVm7a08T1EUE8HQLsHdutMB5 ZtBSYcyZPTG0ktGID6mtBAo4awnyHkT2oFCKxBTlp09ybyr9u/KIOYZenk85nNzkhh71 OaL/I6EdWYI3OJK+CqX9BQ5oGZG7SIVUFzY+xtJKh5wDd4ShA1JwrTAyoVgI/7wY0zKz onHJlAsKyhJwTUg4cLsqI+Qdv+Ceg+B254pkdHWEJXn71kGN1CTtWDWb9USHFjwYj6fs ++bOi3P/6hB/9ueiYOEnW1bkDMrvcGPXH+RkKVPmOIh5KgB4hQN4JYNTh9SIeqQX7ayW r4Ew== X-Gm-Message-State: AOAM531OnGIl2MyjSmwijXEbpnck5JjQGOarHhP6Q6VylBBLC5OjhW+j Zaiw/eM9OYlEewnROWKNubt/S0vvnGA3Z7DFKV4= X-Google-Smtp-Source: ABdhPJzImt+ACNfxLNmZ59/zVfWg2Dt7f5Db+qAOQ4SuRtgZ/DyLpD9J6xJYRAKpnKe7zMveDaBC7uBCJRfM96u6Bv4= X-Received: by 2002:a50:da8b:: with SMTP id q11mr20329289edj.352.1612831071773; Mon, 08 Feb 2021 16:37:51 -0800 (PST) MIME-Version: 1.0 References: <77dfe9e5-a6d1-4a41-bceb-454a65cf34d0@www.fastmail.com> In-Reply-To: Date: Tue, 9 Feb 2021 00:37:42 +0000 Message-ID: To: tyson andre Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000001dab1905badc7fc1" Subject: Re: [PHP-DEV] [VOTE] PHP\iterable\any() and all() on iterables From: tekiela246@gmail.com (Kamil Tekiela) --0000000000001dab1905badc7fc1 Content-Type: text/plain; charset="UTF-8" Hi Tyson, Thanks for the RFC. I have to say that I like the core concept and the motivation behind it. However, let me explain why I voted No. 1. As others have said I think that the scope is too small. If we are going to create that namespace then I would like to see more functions/classes in that namespace. 2. I don't like the name. I know the namespace might provide some guidance of what the function is, but namespaces are often imported. What we are left with in the code is then `any()`/`all()` that doesn't have a self-describing name. any_values is better but still doesn't describe the action that the function will take. I am a strong believer that methods and functions should be called with verbs which describe an action. e.g. search, filter, combine, merge, etc. There can always be exceptions but there should be a good reason to justify such an exception. 3. I am unclear about the implementation itself. There aren't that many clear examples in the RFC. For example, I don't understand why the second parameter is nullable and optional. How is it different from array_filter? 4. Please, no more loose checks. I don't want to have the same trouble as with `in_array()`. Kind Regards, Kamil --0000000000001dab1905badc7fc1--