Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111836 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 54757 invoked from network); 3 Sep 2020 21:03:39 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Sep 2020 21:03:39 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id ECEC0180546 for ; Thu, 3 Sep 2020 13:08:53 -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=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, 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-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) (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 ; Thu, 3 Sep 2020 13:08:53 -0700 (PDT) Received: by mail-pg1-f179.google.com with SMTP id 31so2971216pgy.13 for ; Thu, 03 Sep 2020 13:08:53 -0700 (PDT) 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=0q9zATEBzeL4Z5mHxzTfD6NIymG74r4i9LTR4Rv6pTg=; b=T/5oKOAftyrKZtxCTuQSYzSQVANpYijN25JkzqrnRn+kJIw4Jh8MJBe2LeAxe2NgHg QqjfajjOuAbPqeDMnDvrw2vrC1cHyCGYvXQUrBjSLZHDTu4RvC0SGJEBl+f0PGu6RTrK 44eFooklsmtoJ0verfjfg35eZKU3EuymRDxmnc5foTElv7EkCCR58c75I4F6VXowKE/i 72ukWvcTkFbBr8y5l8v+k5ReOsQt/ml8LJ7cWH6qzKQKx+NqOEkLmJCmlNXxzt/tAn1q hhbpR1xFs9LbjM2g86FtMl0FmsO142kQRODzQJgdHWWFV7z04cc6YxFbXObqrND+J+8S FviQ== X-Gm-Message-State: AOAM530Bt7MKHhXvi2AHZu/Qz6GetBqZ2m9cJCnX1doVEzXLaJcr9HGA igOlUPx6aI6MJdrktTkM0WdQqfTOjOWWIoBa8D4= X-Google-Smtp-Source: ABdhPJxOzUCtZ+sLKyM7EiibiLECkkd/4mm7upyjAol2gY5wW5Nk8bSeqgTmRGBhemM53janxmrBkhuh8I1MabMWGd0= X-Received: by 2002:a62:4c7:: with SMTP id 190mr5274462pfe.103.1599163731623; Thu, 03 Sep 2020 13:08:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 3 Sep 2020 23:08:41 +0300 Message-ID: To: Nikita Popov Cc: tyson andre , Lynn , PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] Global functions any() and all() on iterables From: kalle@php.net (Kalle Sommer Nielsen) Den tor. 3. sep. 2020 kl. 15.18 skrev Nikita Popov : > The main thing I'm concerned about is that once we start extending this > area (I assume that any & all are not going to be the last additions in > this space) we will quickly run into function names that are either too > generic or outright collide. For example, what if we want to add an > iterator-based version of range()? Do we *really* want to be forced to pull > a Python and call it xrange()? That's about as good as real_range()... I agree with this point, and we already have some `iterator_*` functions in ext/spl. Such as `iterator_to_array()`, `iterator_count()` and `iterator_apply()`, so that prefix is somewhat available to use for consistency. -- regards, Kalle Sommer Nielsen kalle@php.net