Re: [RFC] Global functions any() and all() on iterables
| From: | Lynn | Date: | Tue, 01 Sep 2020 07:57:05 +0000 |
| Subject: | Re: [RFC] Global functions any() and all() on iterables | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-111761@lists.php.net to get a copy of this message | ||
On Tue, Sep 1, 2020 at 9:31 AM Nikita Popov <nikita.ppv@gmail.com> 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.
>
> Regards,
> Nikita
>
Hi,
I would very much prefer the verbose versions of the two, "iter" doesn't
mean much to me, and I can imagine it's confusing to newer developers as
well. I'd rather not have to guess what it means when reading it, as it
could also mean something I've never heard of. Though if the choice arises,
I would prefer "any" and "all" over "iterable_any" and
"iterable_all" for
the sake of simplicity.