Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81529 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84808 invoked from network); 1 Feb 2015 12:34:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Feb 2015 12:34:48 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.214 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.214 mail4-2.serversure.net Linux 2.6 Received: from [217.147.176.214] ([217.147.176.214:40189] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E5/96-01632-66D1EC45 for ; Sun, 01 Feb 2015 07:34:47 -0500 Received: (qmail 4242 invoked by uid 89); 1 Feb 2015 12:34:43 -0000 Received: by simscan 1.3.1 ppid: 4235, pid: 4239, t: 0.0741s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.8?) (lester@rainbowdigitalmedia.org.uk@86.189.147.37) by mail4.serversure.net with ESMTPA; 1 Feb 2015 12:34:43 -0000 Message-ID: <54CE1D63.7060604@lsces.co.uk> Date: Sun, 01 Feb 2015 12:34:43 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Fix "foreach" behavior From: lester@lsces.co.uk (Lester Caine) On 01/02/15 03:39, Dmitry Stogov wrote: > I also thought about similar approach for "object by value case". > I think, first we should accept the proposed in thic RFC behavior. It's > consistent, and more comatible with PHP5. Later, if we decide to merge > zend_array with HashTable we may try to change it. I know I'll get told off for getting off topic, but I think that often a clean overview helps better understanding of fine detail which currently goes over my head and I'm sure others as well. Pre-OO days we created arrays of 'objects' which were and still are simply organised sets of data. A set of static functions would be called against a list of 'objects' using foreach to loop through all the elements. Data would be organised to allow the best performance and packets of data were passed via reference. Nowadays we replace the 'set of static functions' with a class and the data is wrapped up within that object, but IS that really the best way of handling a list of objects? There is nothing stopping our using a class to wrap an array of data sets and if the persistent data has been streamed from a database is it REALLY sensible to build individual OO objects for each? With all of the complexity being loaded into PHP7, it just seems that the main target areas that the majority of users need has been lost. Fine tuning just how things like foreach works is fine, but has some of the need been create by having lost site of the simpler functionality which is all most users require? -- 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