Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72658 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77345 invoked from network); 17 Feb 2014 17:08:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Feb 2014 17:08:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=guilhermeblanco@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=guilhermeblanco@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.179 as permitted sender) X-PHP-List-Original-Sender: guilhermeblanco@gmail.com X-Host-Fingerprint: 209.85.128.179 mail-ve0-f179.google.com Received: from [209.85.128.179] ([209.85.128.179:64444] helo=mail-ve0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/82-64799-21242035 for ; Mon, 17 Feb 2014 12:08:34 -0500 Received: by mail-ve0-f179.google.com with SMTP id jx11so12369410veb.38 for ; Mon, 17 Feb 2014 09:08:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=POJNJzE1wxWFcgKSuimZf0pRWMR3Boe4Hemr6l+TWoY=; b=w8579aavq0xfvuQvh5LmGNhqFhv7UJIVIZUKXLe1FTKWnCdTwQv4VCZh0fMX70MM/q dSfekPaPMIiGuZfosri4EoMRxhSwScH8LW3pIN177zpjpFSd1Fi+0vc58mkxU9n6ED3B GdHEgmpJzT/bICEQjNCqHhpvL91hgx1s16AxZUb7NMkV4H0iE6c4ecthHox66Wr8A+2H a08ligCIOOrEgJAO/OXdEu1GfzsL9gzbrVCAQ3kyJQn3QLY+NcdbqLx1SxXk/Yft9hSS i/4E9+I3vft18rF5NCCHPMG4k9knvQd1v9QfUqpUdx6hTNSRFtCOwcgU1Wtd/Nn2H7hE WSJA== X-Received: by 10.52.237.167 with SMTP id vd7mr791157vdc.54.1392656911413; Mon, 17 Feb 2014 09:08:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.83.130 with HTTP; Mon, 17 Feb 2014 09:08:11 -0800 (PST) In-Reply-To: References: Date: Mon, 17 Feb 2014 12:08:11 -0500 Message-ID: To: Amaury Bouchard Cc: Pierre Joye , PHP internals Content-Type: multipart/alternative; boundary=089e01182bb47fb54f04f29d3492 Subject: Re: [PHP-DEV] my take on PHP 6, part 2 From: guilhermeblanco@gmail.com ("guilhermeblanco@gmail.com") --089e01182bb47fb54f04f29d3492 Content-Type: text/plain; charset=UTF-8 We could all look of what users are willing for too... there was a thread on Reddit about it. Here was my comment: http://www.reddit.com/r/PHP/comments/1iw0cj/what_would_you_change_about_php_if_you_could/cb9rzw4 Here is the comment for lazy readers. My suggestion back in 2011 was to rewrite Zend Engine to accommodate a few things that people are considering as must-haves nowadays. Based on history, each ZE is rewritten after every 5 years (1996 - 2001 for ZE1, 2001 - 2005 for ZE2), which hints we may be in a need to reevaluate current code and plan support for next 5 years. A couple of things to motivate: - Native Unicode support - Make opcode cache native - Better garbage collector - Add basic support for interceptors (preConstruct, postDestroy, aroundInvoke) - Operator overloading, allowing things like Comparable interface - Attempt to simplify language operators/keywords/symbols - Native ctype support (no, not the current supported one. Look for its support in Python) - With better opcache and ctype, also add better dl(), completely removing the need to have so many extensions in core - Remove "global" support - Errors to exceptions - Consistent exception messages - Scalar type hinting - Named Parameters - Annotations - Default class resolution/loading (aka. Native PSR-0 support) - Remove error suppression (@ operator) - C# style mutators and accessors - Comparable interface - Collection, Map, Set, List, Bag - Namespace visibility - Namespace Variables - Namespace Reflection API - Drop optional property/method visibility support (make them required) - Polymorphism (aka. method overloading) - Virtual methods - pecl_http into core (considering better dl() item isn't accepted) - Previous item would lead to complete removal of superglobals - Normalize overall current/future design for the language (why __toString, __wakeup, __sleep vs. Jsonable or Serializable interfaces?) - Primitive types (enhance SplInt et al. and make them native, with actual _* required methods and discard nice to have ones) - Add valuable to these primitive types (oh, and make the default parameter ordering. Not everyone would love to keep using named parameters over and over) - Make native functions support Spl* instances (ie.: substr(new SplString('foobar'), 0, 3)) as a beginning to remove overall functions support - "Strict" variable types (relies on previous 2: type hinting, type inference, type casting, return types. Quotes were added because they would be inferred, not declared. That would force assignments to validate types, such as $a =1; $a=false; would throw an exception because you're changing variable type) - Remove functions from global namespace - Threads support (no, don't tell me about pthreads extension) - Shorthand functions declaration somehow - Get rid of aliased functions - Basically apply Poka-Yoke principle to the language. There should be only one way of doing a given action Hm... I think that's enough for now! =) Cheers, On Mon, Feb 17, 2014 at 5:39 AM, Amaury Bouchard wrote: > Before opening a new thread about JIT, I have one simple question. > The wiki page created by Pierre talks about LibJIT. This library has an > integrated interpreter (for platforms where JIT is not available). I don't > know anything about the speed of this interpreter, but maybe it could be > interresting to evaluate it as the lone interpreter in the PHP engine. Is > anyone thinked about that? > > > 2014-02-17 7:28 GMT+01:00 Pierre Joye : > > > hi, > > > > I put my thoughts and summary of the recent discussions about what > > could be PHP 6 here: > > > > https://wiki.php.net/ideas/php6 > > > > Things like "we should name it php7" has not been covered, for one > > obvious reasons. > > > > It is not a TODO list but a list of proposals I would like to see us > > discuss, work on, push harder. They are features, changes, etc. I have > > been hearing for years and things we should really give more > > attention. > > > > Please do not mass reply to this thread but prefer to create one new > > thread per topic. Who knows, we may get enough input to create one > > wiki page per topic. And if you are lucky enough, we may even have > > some working groups for each of them? > > > > Happy reading, comments, feedback and the likes welcome! > > > > > > Cheers, > > -- > > Pierre > > > > @pierrejoye | http://www.libgd.org > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- Guilherme Blanco MSN: guilhermeblanco@hotmail.com GTalk: guilhermeblanco Toronto - ON/Canada --089e01182bb47fb54f04f29d3492--