Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96692 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91108 invoked from network); 1 Nov 2016 09:04:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Nov 2016 09:04:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 185.153.204.214 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 185.153.204.214 mail4-2.serversure.net Linux 2.6 Received: from [185.153.204.214] ([185.153.204.214:51280] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/51-07317-28A58185 for ; Tue, 01 Nov 2016 04:04:03 -0500 Received: (qmail 20140 invoked by uid 89); 1 Nov 2016 09:03:58 -0000 Received: by simscan 1.3.1 ppid: 20123, pid: 20137, t: 0.0541s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.7?) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 1 Nov 2016 09:03:58 -0000 To: 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> <82bf29ec-1971-cbe5-2e0b-3c9e0bd94eb7@syberisle.net> Message-ID: <111673b0-cd47-70b6-e2db-4d8b65c25143@lsces.co.uk> Date: Tue, 1 Nov 2016 09:03:48 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; 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: 7bit Subject: Re: [PHP-DEV] Allow Iterator to be used with current, next, reset, key functions From: lester@lsces.co.uk (Lester Caine) On 01/11/16 05:53, Yasuo Ohgaki wrote: > On Tue, Nov 1, 2016 at 11:53 AM, David Lundgren wrote: >> > What if we made ArrayIterator transparently wrap all array's? > If you take a look at SPL array object code, you'll see why there are > so many missing functions. It's just pain for me to write new method > even with simple one. So why don't people use SPL array objects where they want this repackaging of the procedural code? It has not gained traction as a full time replacement, but why not? > Can we get rid of some features from array objects? and make it > simpler? e.g. We don't need 2 ways to store array data, I suppose. > Why there are 2 ways? There are more ways to a lot of things than are actually needed, but stripping out 'duplicates' needs agreement on which are the better way. Personally I don't see the 'advantages' of completely remodelling the way the procedural functions work. If you want yet another user interface, build it as an object class. The bulk of the duplication is down to people adding their own view on how things should be done, and perhaps it is time to decide what is the core set of functions needed to handle simple structures and move everything else into optional extensions ... beginners don't need all the heavy stuff and I include Reflections in that ... A starter manual does not need the bulk of the code that is weighing down PHP today. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk