Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61268 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18091 invoked from network); 16 Jul 2012 01:14:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jul 2012 01:14:42 -0000 Authentication-Results: pb1.pair.com header.from=ajfweb@googlemail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajfweb@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 74.125.82.54 as permitted sender) X-PHP-List-Original-Sender: ajfweb@googlemail.com X-Host-Fingerprint: 74.125.82.54 mail-wg0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:60072] helo=mail-wg0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D7/F3-20866-00B63005 for ; Sun, 15 Jul 2012 21:14:41 -0400 Received: by wgx1 with SMTP id 1so710567wgx.11 for ; Sun, 15 Jul 2012 18:14:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=bxS+s+ZvRe+tQr0d+QSlQxdqGvqOoLjP3IbdIR06MUc=; b=GUFLVI1mhnuasMLRP4+zlXX9wtJaPx3Qu9ioo7/83kwIqhdCZz+vf0wwpCNVFFEU9L FeFEuBIlfbct3yo4zqTzsIqhr+T612q+WmhRgZ1AGW7HP5J9ZJ8sbbMwg+vrHGnT9CK/ uwGwzNuGCnegDmzX3RHXK5700eEEGmEYe1Pjh6/ZzHeR6YpDrN/jrI8Cz3qVa8mz3I/Z W6/GnFTHkvn0hbqiAz/yai615nOXiBcaaxyOKgYMXNnKgql5fo6vd9RcOzr0kIGcaY3t m6UZbGZdry5VkvDVQzjI5xS7uaq2jmt6p1888lWnyTaNfjpF5n3eVUtR6tcqFrxmlj4A Uv3g== Received: by 10.180.92.129 with SMTP id cm1mr14126820wib.10.1342401278220; Sun, 15 Jul 2012 18:14:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.71.199 with HTTP; Sun, 15 Jul 2012 18:14:18 -0700 (PDT) In-Reply-To: <50036A37.10605@garfieldtech.com> 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> <500368C5.4030905@garfieldtech.com> <50036A37.10605@garfieldtech.com> Date: Mon, 16 Jul 2012 02:14:18 +0100 Message-ID: To: Larry Garfield Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Internal iteration API From: ajfweb@googlemail.com (Andrew Faulds) forwarding. On 16 July 2012 02:11, Larry Garfield wrote: > I think you meant to send that to the list. :-) > > --Larry Garfield > > > On 07/15/2012 08:07 PM, Andrew Faulds wrote: >> >> It would be nice if PHP 6 unified the semantics of >> string/int/float/bool, arrays, and objects. For those first three you >> could use immutable objects, and arrays are just objects implementing >> ArrayAccess etc. >> >> On 16 July 2012 02:05, Larry Garfield wrote: >>> >>> 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 >>> >>> >>> -- >>> PHP Internals - PHP Runtime Development Mailing List >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >> >> > > -- Andrew Faulds (AJF) http://ajf.me/