Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69377 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16219 invoked from network); 27 Sep 2013 07:30:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Sep 2013 07:30:04 -0000 Received: from [127.0.0.1] ([127.0.0.1:5614]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 02/A3-28456-CF335425 for ; Fri, 27 Sep 2013 03:30:04 -0400 Authentication-Results: pb1.pair.com header.from=gooh@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=SRS0=curL=TH=php.net=gooh@srs.kundenserver.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain srs.kundenserver.de designates 212.227.17.9 as permitted sender) X-PHP-List-Original-Sender: SRS0=curL=TH=php.net=gooh@srs.kundenserver.de X-Host-Fingerprint: 212.227.17.9 moutng.kundenserver.de Received: from [212.227.17.9] ([212.227.17.9:57718] helo=moutng.kundenserver.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 05/33-28456-8F035425 for ; Fri, 27 Sep 2013 03:17:12 -0400 Received: from [192.168.1.105] (i577B2BDD.versanet.de [87.123.43.221]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MNw31-1VWKBa0U6l-007GBx; Fri, 27 Sep 2013 09:17:09 +0200 Message-ID: <524530F4.7010806@php.net> Date: Fri, 27 Sep 2013 09:17:08 +0200 Reply-To: gooh@php.net User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:83Vl3eUD0uwKB0jbSwR534isbG1BV5mhLFzDeALU3VK dv5rVWpr8wBAW070X5yMk28XLFW/FmSdnPuxWwl1XTEAfmv5Sz 1xe9/RNsgS6Zrd3cnsRQ/zS6BdqS3LqIIyHOwLnPDwbLAEJZFO 1AmyPX0Hm4yBFan8xbWPyjm87JrC59DZ9gtXd6gdG5DO0YkTxR KJEGYVAH5YDfuo3pImr/aV8BzLzkw7N0VKoIv1pwG3Xm9cW7sX OD6nqje+i/vJQ/hQEzZN64VmaR6C14HfRjVY6mgbipH80EAIM1 tUy4MfnjUOdDgSZ8b8bw75iJHbNiQPTy4lB1hHweYuC7xkuqHd pknOkrJB9tTpMqtkRZTE= Subject: RFC: Automatic Property Initialization From: gooh@php.net (Gordon Oheim) Independent but related to - https://wiki.php.net/rfc/constructor-promotion I wrote an RFC about porting Dart-like Automatic Property Initialization to PHP. Nikic was so generous to provide an initial PoC for it (since I don't do C): - https://wiki.php.net/rfc/automatic_property_initialization - https://github.com/php/php-src/pull/474 I am proposing this for inclusion in 5.6. There is no BC breaks afaik. The RFC suggests to allow for $this->foo as Constructor arguments to make the boilerplate code for property assignments in constructors superfluous. This is the core feature subject to discussion. I've spoken to about two dozen developers outside internals prior to suggesting this RFC and the general response was positive and the core feature unanimously deemed useful. Moreover, in the previous discussion about constructor promotion there was some messages suggesting that the now proposed syntactic approach is more preferred than using visibility keywords. The RFC also suggests some related syntactic sugar like Methodless Constructors, an alternate and shorter syntax, as well as making this available in the entire class scope. These are things I am not sure of so I am hoping for comments on these. Should this RFC get into the voting phase, we should by then have either promoted or eliminated these options through discussion. Thanks and Regards, Gordon