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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to