Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96728 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90011 invoked from network); 4 Nov 2016 02:52:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2016 02:52:27 -0000 Authentication-Results: pb1.pair.com header.from=dlundgren@syberisle.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dlundgren@syberisle.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain syberisle.net designates 96.126.116.40 as permitted sender) X-PHP-List-Original-Sender: dlundgren@syberisle.net X-Host-Fingerprint: 96.126.116.40 mail.syberisle.net Received: from [96.126.116.40] ([96.126.116.40:43265] helo=li341-40.members.linode.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6D/60-34238-8E7FB185 for ; Thu, 03 Nov 2016 21:52:26 -0500 Received: from localhost (admin.local [127.0.0.1]) by li341-40.members.linode.com (Postfix) with ESMTP id D4E9825253 for ; Thu, 3 Nov 2016 22:52:21 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at syberisle.net Received: from li341-40.members.linode.com ([127.0.0.1]) by localhost (syberisle.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JQ-2djXGp3xZ for ; Thu, 3 Nov 2016 22:52:21 -0400 (EDT) Received: from oo-laptop.local (cpe-65-29-233-211.wi.res.rr.com [65.29.233.211]) (Authenticated sender: dlundgren@syberisle.net) by li341-40.members.linode.com (Postfix) with ESMTPSA id 4A38B25252 for ; Thu, 3 Nov 2016 22:52:21 -0400 (EDT) To: internals@lists.php.net References: <44244cfd-c8ad-e0a9-4e70-380a8a8c940c@syberisle.net> Message-ID: <3fcfd89c-12d8-8fa9-eab7-5461771fdb9c@syberisle.net> Date: Thu, 3 Nov 2016 21:52:20 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Allow Iterator to be used with current, next, reset, key functions From: dlundgren@syberisle.net (David Lundgren) On 11/3/16 2:58 PM, Levi Morrison wrote: >> I think it would be bad to remove these functions and force users to >> wrap arrays with ArrayIterator, just to manually iterate an array. After >> spending a little time looking through how these functions are being >> used in frameworks and libraries, removing them seems like it will cause >> more harm than good, even in a future version of the language. > > Can you show some examples of frameworks and libraries you found where > it would cause more harm than good? Apologies, that was a subjective statement. I also made it appear that the usage of these functions was greater than it may really be, and would cripple said projects, that was not my intention, and most definitely not the case. These are the ones I remember, and another way could be used if current/next/key were not available for these contexts: Yii CMarkdownParser: https://git.io/vXCiy ZF2 stdlib FastPriorityQueue: https://git.io/vXCiH Drupal DI Container: https://git.io/vXCPB Symfony MO file loader: https://git.io/vXCPK Symfony HttpFoundation Request: https://git.io/vXCXW Dave -- David Lundgren dlundgren@syberisle.net GPG: 0x26F54D7F