Re: [PATCH] Implementing array_every() and array_any()

From: Date: Mon, 22 Oct 2018 05:39:33 +0000
Subject: Re: [PATCH] Implementing array_every() and array_any()
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-103360@lists.php.net to get a copy of this message
On Sun, Oct 21, 2018 at 10:04 PM bugreportuser <bugreportuser+php.internals@gmail.com> wrote: > > Hi everyone, > > A patch for array_every() and array_any() was abandoned from inactivity, > so I wrote a new patch for it: > > https://github.com/php/php-src/pull/3597 > > There was never an internals@ discussion that I can find, but there are > some comments on the old pull request. Most of what I changed was not > including a traversable type in the same patch, since > https://bugs.php.net/bug.php?id=76865 was opened. > > Any thoughts/comments? > > Thanks I think this is too small in scope, but... I there is some point where we should have a standard library v2.0 which incorporates the years of improvements in the language and experience gained to produce a better experience. I don't think we're there yet. Some features that might put us there: - Generics and callable type signatures e.g. function transform<T, U>(callable(T): U $transformer, iterable<T> $input): iterable<U>; - Named parameters or parameter labels e.g. sorted($iterable, compare: greater_than()) As things are now I don't think the end result would be better by enough to warrant the effort and disruption into the ecosystem. So tying this back to the proposal: I think it's best to wait.

« previous php.internals (#103360) next »