Re: [RFC] Global functions any() and all() on iterables

From: Date: Thu, 03 Sep 2020 20:08:41 +0000
Subject: Re: [RFC] Global functions any() and all() on iterables
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-111836@lists.php.net to get a copy of this message
Den tor. 3. sep. 2020 kl. 15.18 skrev Nikita Popov <nikita.ppv@gmail.com>: > 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

« previous php.internals (#111836) next »