Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103360 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 40392 invoked from network); 22 Oct 2018 09:25:21 -0000 Received: from unknown (HELO mail-lf1-f66.google.com) (209.85.167.66) by pb1.pair.com with SMTP; 22 Oct 2018 09:25:21 -0000 Received: by mail-lf1-f66.google.com with SMTP id q39-v6so29320530lfi.8 for ; Sun, 21 Oct 2018 22:39:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KpccGVxY+C0tuZ50RWMMy5Q9Zipf8h0ano4+IIkQICg=; b=OIU5brMGVHV2YKOi3n3ehJJDK9bme/WmvY0um2Z3DcWZOhB0zmM3Lx9oPi3A4/Iibx krDAcwN/XQNyJQvyyxlclAD53oTHShRcQrrD8hFeOtE3TkDr9rK4lDDm3iZF0HSVrKYQ y1MEgNz0nw+KXPE6wO4pEqePt0O8MIrC/lFCHBPxzIceCWyHfFJZACN1GEEqlk8f6yN1 xqMhpww8fyip5CnGvmqjbhJ8Kf4LMyscNokpXAJkiWtYS+T265UPZ+NwoQJb828ICtaE gk9IPrXoviwig+0a5Eew+yK8/hHvx6iJL9mvPs4AWvvIYyN99PK9kcV5/N49StOF7tHx nmJg== X-Gm-Message-State: ABuFfohUP1F9OaM+JFKjwR6VWfzKFE2huXozv3ecmq9WzEfedAgMe3Fg /PVfPzcHL9Jw07jSpswBZh1vNSO4drLQmIw6Vfs= X-Google-Smtp-Source: ACcGV62lyZFKl+eBVsDOzCnC5WnJDkGXDMhr0AyWuQX1rtUWZNB2jmdb0dYvRXQU6cTbYRPvneEQU4DwezhpUkEEgJ8= X-Received: by 2002:a19:a2c1:: with SMTP id l184-v6mr8825769lfe.33.1540186794015; Sun, 21 Oct 2018 22:39:54 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 21 Oct 2018 23:39:33 -0600 Message-ID: To: bugreportuser+php.internals@gmail.com Cc: internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [PATCH] Implementing array_every() and array_any() From: levim@php.net (Levi Morrison) On Sun, Oct 21, 2018 at 10:04 PM bugreportuser 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(callable(T): U $transformer, iterable $input): iterable; - 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.