Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61334 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97450 invoked from network); 17 Jul 2012 07:40:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jul 2012 07:40:14 -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.170 as permitted sender) X-PHP-List-Original-Sender: ajfweb@googlemail.com X-Host-Fingerprint: 74.125.82.170 mail-we0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:57178] helo=mail-we0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/50-28715-CD615005 for ; Tue, 17 Jul 2012 03:40:13 -0400 Received: by weyr1 with SMTP id r1so80243wey.29 for ; Tue, 17 Jul 2012 00:40:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Z6lRx819ODU5V1FXOUBwa1V9WSJ44HHZS5WEOeTmcEQ=; b=QSsuOHhtGMgcPC6eBtaxiY8PYUMG9oXOBCRhYoQnLiYyslJVZJuSkkPqB2+K+eNLWl TgHN4A0LE558VMuPPSt9UQTHcwhyTOdo2D6Sc6QDEhAeHbpbplxTZFK2qdv3s3Uj5+aP NOpyXfTIS9IMjfKjreVcH/+aLoRN0B/2AXV56Ohcbzvg5SR4/rFzawL5nwnTSSQsjnah 3O/sn5opEkFGZr8gY8/e4a45cLc7OXLxTZW8W75E0x89i45Yjeo6qHLt7FmKFt657neq gzhVADUN+85++PNAzHz0FU4rxSikGGhp/Hpi0SyK1XEl4PiiYOmlqUIV5F/v6mEX7d/9 JCgw== MIME-Version: 1.0 Received: by 10.180.92.129 with SMTP id cm1mr1803722wib.10.1342510810479; Tue, 17 Jul 2012 00:40:10 -0700 (PDT) Received: by 10.216.160.16 with HTTP; Tue, 17 Jul 2012 00:40:10 -0700 (PDT) Received: by 10.216.160.16 with HTTP; Tue, 17 Jul 2012 00:40:10 -0700 (PDT) In-Reply-To: <5004B10A.8070504@gmail.com> References: <5004B10A.8070504@gmail.com> Date: Tue, 17 Jul 2012 08:40:10 +0100 Message-ID: To: David Muir Cc: internals@lists.php.net, Anthony Ferrara Content-Type: multipart/alternative; boundary=f46d043c7d14f73cb104c501a7a0 Subject: Re: [PHP-DEV] 6.0 And Moving Forward From: ajfweb@googlemail.com (Andrew Faulds) --f46d043c7d14f73cb104c501a7a0 Content-Type: text/plain; charset=UTF-8 That would be nice and all, but I'd rather we add methods to arrays. On Jul 17, 2012 1:26 AM, "David Muir" wrote: > On 14/07/12 01:33, Anthony Ferrara wrote: > >> Hey all, >> >> I know that 6.0 was originally supposed to be the unicode conversion of >> the >> engine. However it appears that all progress on that has stopped for quite >> some time. >> >> So, I was curious if we could start a conversation around what 6.0 would >> look like if we didn't go the unicode route. What would be the major >> changes that we'd base it on. >> >> Here are a few of the ideas that have been floating around in my head. >> >> 1. Change the error handling system from the current E_* system to typed >> exceptions for everything but advisory errors (E_STRICT, E_NOTICE, >> E_DEPRECATED). Why? Because the current error system encourages ignoring >> or >> not checking what the error was, and it makes defensive programming quite >> difficult. This is arguable and preference for sure, but it's a major >> change that could have large benefits. >> >> 2. Make namespaces first-class meta-objects. That way, you could have >> namespace private and protected classes, functions, variables, etc. This >> would allow for better scoping of modules... >> >> 3. Make all zval types pseudo-objects. Basically enabling something akin >> to >> auto-boxing allowing a significant amount of the standard library to be >> eventually deprecated in favor of acting on methods (not initially, but >> opens the door). >> >> 4. Rewrite the entire parser completely. I keep hearing about how bad >> PHP's >> parser is, and how it's growing out of control. Perhaps this is a good >> time >> to rewrite it (perhaps changing semantics slightly) to be better adapted >> towards future changes... >> >> I'm not saying all of them are solid. I'm not saying any of them are >> solid. >> But hopefully this can spark a discussion around it... >> >> Thoughts? >> >> Anthony >> >> > I'd *really* like to see the following being possible: > > $array = array('foo' => 'bar'); > $object = (object) $array; > > echo $array['foo']; //bar > echo $array->foo; //bar > > echo $object['foo']; //bar > echo $object->foo; //bar > > Is there a technical reason for the difference that currently exists? > > Cheers, > David > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --f46d043c7d14f73cb104c501a7a0--