Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96683 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43299 invoked from network); 31 Oct 2016 18:17:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Oct 2016 18:17:52 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.17.20 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.17.20 mout.gmx.net Received: from [212.227.17.20] ([212.227.17.20:64570] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5F/62-25911-FCA87185 for ; Mon, 31 Oct 2016 13:17:52 -0500 Received: from [192.168.2.103] ([79.243.119.150]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0Mam2Q-1cKa9b2kVW-00KSOd; Mon, 31 Oct 2016 19:17:45 +0100 To: Larry Garfield , internals@lists.php.net References: <44244cfd-c8ad-e0a9-4e70-380a8a8c940c@syberisle.net> <01f2f3da-592b-fd23-709d-ad620422f56d@fleshgrinder.com> <7fb9a5d5-318d-7ed3-59eb-d9845ed5dec1@gmail.com> <5219c048-66f1-be9a-ae3c-15633a65e263@garfieldtech.com> Message-ID: Date: Mon, 31 Oct 2016 19:17:53 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <5219c048-66f1-be9a-ae3c-15633a65e263@garfieldtech.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:Ou0/EwDmtXt/tREv0ORBCGJcVIG7T6onF9sP5EbEoO8Z9UN7vwi eapRW8F3zDcK38hSRjklcMc35hQ5ZJwF0OmoVwJlvYZ5MSCO+LUetXCA0pFTdLc9LxSbtQv YH0epILozGeOLMkxJyJDhrscLlKKaTNyxarbuk4Za/7qt5LS8ZOy72bD9rl77oWvXv/d7UX 41xz6DYTe4dSzy1OayUag== X-UI-Out-Filterresults: notjunk:1;V01:K0:7wb21Ayd65Q=:S19nKicv3RjqfiT/d+j/TK dzg8cNm8shPAu5bXGW2z46Qmpf0hM+VY0TRjqSAMkjp/jRjdRF7/0VpW74UFLpBDoUFrN59fk yAeG7WNXwF8VrjFCZ2bWrMBrGI+KUhgB6tPdAhxJn2i+/ZqBxJcQu8uVxMGE8HFnIku9gV+UX sHnCHLYxd3GNycQ5j2Z6ODQf3RgdovYoDD9BLtPC6WafzRqsJt879OF+YR9rOZT1Fi5RzL0G9 GBkR0jdgRah1tIxp4EAMrzJ2A2D+hkWrlxnEgszVXQulGuYElf7nHpmTuapKrOqT7V+V0u6Kb aqhLaQkhtDXZ/MPWgHqigFw/aSbB2CR3EYj4FVsFSEKyRpr/It2zSO1F9/OcyQF9RIjhMLYGy 3XSRvfROb+AaglvSwILpI8Tq/cECZmVwOyu9WW+j1s12VDkPKsZ0aAKTNKDgVjWenXn173OBM HoBpJV2O5xK3/gcM4RvQNugJAuUmqCywRTF6NtkXZdhIFbcbo3SmL1rGxz8EaSaWuFjyHGlkO RvoSWo3VFdbTz0deuWMt/otybEpAua5UUC4gUkWpgg8u779/dTnjjCJGFheQwBf55sRxFu6Zg U7E1SYUCqoQpd7AQC9h2qiACBmBOPcbsAS7YsdVvVBTor5qh/dteqIrAb0rNBPAxP8a0Hzknx R2pAimkXOjIdXH8NejJ9+ENe3m55UeOOd67eokZIqNGbqraxl0gANK3jQMuHoyeQhFY3X4T6w gY6pcmaWPZuKG8hr3IeN/gUmifY2XcpAhRLK4pV8+5QqW7uoPRXMU+XfCDp36uFqFWhZzFzBE 3Pmt0Z9 Subject: Re: [PHP-DEV] Allow Iterator to be used with current, next, reset,key functions From: cmbecker69@gmx.de ("Christoph M. Becker") On 31.10.2016 at 18:27m Larry Garfield wrote: > On 10/31/2016 11:26 AM, Alice Wonder wrote: > >> On 10/30/2016 10:19 AM, Rowan Collins wrote: >> >>> - deprecate reset(), end(), each(), and key() >>> - introduce array_first(), array_last(), array_first_key() and >>> array_last_key() >>> - document replacements for whatever other use cases we can find >>> examples of >> >> As a user I certainly like those names better. Semantic function names >> are a definite win in my view. > > Question: Now that we have "iterable" as a type, should we be adding > more array-specific functions or should such operations be designed, and > named, to operate on any iterable? (first(), first_key(), etc.) According to the earlier discussion it is not clear if we want these functions to operate on Iterables (consider Generators). Anyhow, we probably can't introduce a function named first() for BC reasons. -- Christoph M. Becker