Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61329 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70439 invoked from network); 17 Jul 2012 00:25:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jul 2012 00:25:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=davidkmuir@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=davidkmuir@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.42 as permitted sender) X-PHP-List-Original-Sender: davidkmuir@gmail.com X-Host-Fingerprint: 209.85.160.42 mail-pb0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:49629] helo=mail-pb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 07/61-62735-901B4005 for ; Mon, 16 Jul 2012 20:25:46 -0400 Received: by pbbrp12 with SMTP id rp12so12021258pbb.29 for ; Mon, 16 Jul 2012 17:25:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=/PJAoRJHIkq70LeZthB2rx/fRQw4XAu2z7vpNRpBIEE=; b=mc9q/ASf2b/hYq7XiTo5rxkT63TbXZdJS+fc5MailNtZOmD0n/4wtR8RQDUhfHanhA Mk9aQu1zENDddjEZ+vDGHDUoK0RAiRw268kqr2BYbmqib4HGUalyg+Z2V16U/1/c5Mts BKNNXzhiLVTpw4syxtOH1mNulR8XSqmlrYoPgztyDyTOeuCdUMyeAzOx5ucNBZsTZ6l8 KhqGk+FGtmUaCFkXYVPI5/igygPqXtPym6KE/YPRihqx8fydEC1OPx3cVhYChn0HC0+M ra8UIz2U+tdm7/sA3ctdl4Vmg20bqvnPnvuk2Ke+ScH+00kHOW7u+xSrh9JBFTTTs0Bw Pr/w== Received: by 10.68.228.102 with SMTP id sh6mr1640938pbc.134.1342484743143; Mon, 16 Jul 2012 17:25:43 -0700 (PDT) Received: from [192.168.1.181] (tmwpho1.lnk.telstra.net. [110.142.207.74]) by mx.google.com with ESMTPS id rd7sm12836275pbc.70.2012.07.16.17.25.40 (version=SSLv3 cipher=OTHER); Mon, 16 Jul 2012 17:25:41 -0700 (PDT) Message-ID: <5004B10A.8070504@gmail.com> Date: Tue, 17 Jul 2012 10:25:46 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: Anthony Ferrara CC: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] 6.0 And Moving Forward From: davidkmuir@gmail.com (David Muir) 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