Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61360 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59766 invoked from network); 17 Jul 2012 15:23:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jul 2012 15:23:12 -0000 Authentication-Results: pb1.pair.com header.from=christoph.hochstrasser@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=christoph.hochstrasser@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) X-PHP-List-Original-Sender: christoph.hochstrasser@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bk0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:49762] helo=mail-bk0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AC/D0-54353-E5385005 for ; Tue, 17 Jul 2012 11:23:11 -0400 Received: by bkcjm19 with SMTP id jm19so456208bkc.29 for ; Tue, 17 Jul 2012 08:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:message-id:in-reply-to:references:subject:x-mailer :mime-version:content-type:content-transfer-encoding :content-disposition; bh=5nKldXfNinh7ttr5z7T9am3UDLznfTvpxv7dMxAUIRI=; b=B+Y7DbnmX4uRUgTXg+TXoNjZkBqmWbG0Yug5tGalnR4QAVoYGRwV64JP7zYOt5317h YajD8W1Z6e638UEe/Gh0aAqB4wvRb7XKczvaQp4OUl1JdwOCwRbjq9wPyuRZLMheONW3 xv3ptlPuvg+I5lndIaT2OC+gcRsL/EakjICq6AimB3mdSg2RMPmv/ua11vZObsiwonTk mgNEAj0hY3LIeTbwK9VZjhdbmhA3YHNWcYF9GxXqR/pVXrKZqBWQCpnwbLtU2tdBck0H MQ0DV8ejZSMaIdUMK/jF8bNJIYW/AaaG5J6GAoBA726K5CNJV/kmjvQwdJBFP77poMXq 9XOg== Received: by 10.204.157.7 with SMTP id z7mr1570915bkw.14.1342538588168; Tue, 17 Jul 2012 08:23:08 -0700 (PDT) Received: from [192.168.43.209] (089144192226.atnat0001.highway.a1.net. [89.144.192.226]) by mx.google.com with ESMTPS id hs2sm10246804bkc.1.2012.07.17.08.23.06 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Jul 2012 08:23:07 -0700 (PDT) Date: Tue, 17 Jul 2012 17:23:01 +0200 To: Anthony Ferrara Cc: internals@lists.php.net Message-ID: In-Reply-To: References: X-Mailer: sparrow 1.6.1 (build 1081.52) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Re: [PHP-DEV] 6.0 And Moving Forward From: christoph.hochstrasser@gmail.com (Christoph Hochstrasser) Hi, Some of the things I want to see in PHP 6: New designed Standard Library: * Clearly defined conventions for organization, naming and error handling= . * Use Namespaces and groups functions by their purpose (=22net=22, =22str= ings=22, =22arrays=22,=E2=80=A6) * Promote SPL functionality (=22spl=5Fautoload=5Fregister=22, Data struct= ures) to proper Core APIs by dropping the =22SPL=22 prefix. * Converts all resource based APIs (file, stream,=E2=80=A6) to Object Ori= ented APIs * Maybe find a way to share the standard library between multiple impleme= ntations of PHP (HipHop, Quercus, Phalanger). A better parser which is more maintainable and makes it easier to impleme= nt language features every modern programming language has. * Slicing operators for Arrays (and Strings=3F) * Splice Operator: splits an array into arguments for a function call. Then we can finally remove call=5Fuser=5Ffunc=5Farray(). * Optional Semicolons=3F I recently started doing some programming in Go = and I really like this. Clean up the language: * Remove the old array() declaration syntax. * Replace some keywords with syntax constructs. =46or example remove list= () and use multi assignment syntax like =24var1, =24var2 =3D foo(); or remove th= e array() syntax. Makes names like =22List=22 and =22Array=22 usable as Userspace c= lass names again. Remove features which were made obsolete by the SPL: * =5F=5Fautoload() =E2=80=94 was made obsolete by spl=5Fautoload=5Fregist= er() * dir() =E2=80=94 DirectoryIterator, probably make dir() just return a Di= rectoryIterator. * probably more. Make some runtime features more consistent: * Autoloading for all kind of missing constants (function names, namespac= e constants) * =46unction importing just like Class importing * Language Specification which makes it easier to maintain competing impl= ementations. There's probably a lot more we could do, but these are some things from r= ight the top of my head. -- =20 Christoph Hochstrasser http://twitter.com/hochchristoph =7C http://christophh.net =7C https://gi= thub.com/CHH Am =46reitag, 13. Juli 2012 um 17:33 schrieb Anthony =46errara: > Hey all, > =20 > 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 qu= ite > some time. > =20 > So, I was curious if we could start a conversation around what 6.0 woul= d > look like if we didn't go the unicode route. What would be the major > changes that we'd base it on. > =20 > Here are a few of the ideas that have been floating around in my head. > =20 > 1. Change the error handling system from the current E=5F* system to ty= ped > exceptions for everything but advisory errors (E=5FSTRICT, E=5FNOTICE, > E=5FDEPRECATED). Why=3F Because the current error system encourages ign= oring or > not checking what the error was, and it makes defensive programming qui= te > difficult. This is arguable and preference for sure, but it's a major > change that could have large benefits. > =20 > 2. Make namespaces first-class meta-objects. That way, you could have > namespace private and protected classes, functions, variables, etc. Thi= s > would allow for better scoping of modules... > =20 > 3. Make all zval types pseudo-objects. Basically enabling something aki= n 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). > =20 > 4. Rewrite the entire parser completely. I keep hearing about how bad P= HP'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 adapte= d > towards future changes... > =20 > I'm not saying all of them are solid. I'm not saying any of them are so= lid. > But hopefully this can spark a discussion around it... > =20 > Thoughts=3F > =20 > Anthony =20