Re: [RFC] Global functions any() and all() on iterables
| From: | tyson andre | Date: | Tue, 01 Sep 2020 23:54:50 +0000 |
| Subject: | Re: [RFC] Global functions any() and all() on iterables | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-111771@lists.php.net to get a copy of this message | ||
Hi Lynn and Nikita,
> 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.
I'd also feel like iter_any() could get confused with iterator_apply() for Traversable
in terms of whether it's shorthand for iterator or iterable when learning the language.
There's been more discussion than I expected on this, arguments for both options, and I'm
not sure what the overall sentiment of voters is.
I was considering creating a straw poll on the wiki with 2 questions to guide the final version of
the RFC/PR:
1. Name choice (iterator_all(), iter_all(), or all(), or no interest in adding the functionality)
2. Interest in future RFCs to extend support to keys and entries
Thanks,
- Tyson