Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61267 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16402 invoked from network); 16 Jul 2012 01:05:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jul 2012 01:05:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=larry@garfieldtech.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=larry@garfieldtech.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain garfieldtech.com from 66.111.4.27 cause and error) X-PHP-List-Original-Sender: larry@garfieldtech.com X-Host-Fingerprint: 66.111.4.27 out3-smtp.messagingengine.com Received: from [66.111.4.27] ([66.111.4.27:52558] helo=out3-smtp.messagingengine.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 35/A3-20866-8C863005 for ; Sun, 15 Jul 2012 21:05:12 -0400 Received: from compute6.internal (compute6.nyi.mail.srv.osa [10.202.2.46]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id D2D0C2189A for ; Sun, 15 Jul 2012 21:05:09 -0400 (EDT) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute6.internal (MEProxy); Sun, 15 Jul 2012 21:05:09 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=wIYEi0FxbRKFajPs0XXq4y y2my8=; b=IOPpKANHW7KO4h5X1IYXZ8A1p9nm3tXUuchLol3Sk9/LvQFUSJKUK0 bRc+BWtayHyefVuzT28jpTMNI41KbhoQDWd1sQQkjg0I/VJiMpK/iTkysxuBbgqX vN14zNfAV6DGjfPFMllMgOHguanZXUjFyAakqm7eZ5Wt7yOLgEZZQ= X-Sasl-enc: U4+A8zqToJQRHrRiDXW5UxTK1cYm1nheeyjLKA290s4V 1342400709 Received: from [192.168.42.21] (unknown [98.220.238.115]) by mail.messagingengine.com (Postfix) with ESMTPA id 8A0174835F4 for ; Sun, 15 Jul 2012 21:05:09 -0400 (EDT) Message-ID: <500368C5.4030905@garfieldtech.com> Date: Sun, 15 Jul 2012 20:05:09 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: internals@lists.php.net References: <1342050547.1456.33.camel@guybrush> <4FFF6C9C.2080802@gmail.com> <36.A6.17670.8E820005@pb1.pair.com> <50005B38.3090507@sugarcrm.com> <5000BCD2.2040007@garfieldtech.com> <5000BEE9.3070006@sugarcrm.com> In-Reply-To: <5000BEE9.3070006@sugarcrm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Internal iteration API From: larry@garfieldtech.com (Larry Garfield) On 07/13/2012 07:35 PM, Stas Malyshev wrote: > Hi! > >> So, I've not been inside the engine so in practice this may make no >> sense at all, but what about looking at it the other way around? Vis, >> instead of making objects more and more like arrays, make arrays an >> object that happens to implement ArrayAccess, Iterator, and whatever > That'd be very nice idea if we were implementing new PHP. I think the > fact that arrays are not objects in PHP is a source of many problems. > However, right now it probably won't be possible to do it without > breaking BC in many places dealing with array copy/assignment/passing > semantics. Hm, valid point. Is there no way that we could setup one object to pass "the old way"? I suppose that would result in just as many special case exceptions... Perhaps that's a change that could be considered for whatever version does get called PHP 6? PHP 5 changed the passing semantics for objects and we survived that, and it was a big boon to the language. Perhaps that could be rolled into bigger changes later? (There's a PHP 6 thread right now I've not looked at yet...) --Larry Garfield