Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69384 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35142 invoked from network); 27 Sep 2013 10:00:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Sep 2013 10:00:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=krebs.seb@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=krebs.seb@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.177 as permitted sender) X-PHP-List-Original-Sender: krebs.seb@gmail.com X-Host-Fingerprint: 209.85.212.177 mail-wi0-f177.google.com Received: from [209.85.212.177] ([209.85.212.177:58259] helo=mail-wi0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D6/47-28456-04755425 for ; Fri, 27 Sep 2013 06:00:33 -0400 Received: by mail-wi0-f177.google.com with SMTP id cb5so559381wib.10 for ; Fri, 27 Sep 2013 03:00:30 -0700 (PDT) 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=WRs6F/n5fhhN2P18a45gm7eXmDdsEAMBJWgtU9CA/2I=; b=yIo+9faK57hoZjsc+8VtTWpF67v+znKiVTA4UAwC5WDbfFysZMhubk1RZlJoPQGZjO dVhj5c8A44wqgbPIGnBX4z0Mg1qhU5+tIfLKFkTvuNyI67zfZMI1QwGfyPJ0/S8K358K JI7b8uoNEQHE3Cn6wZ4/PMMqlulouvrhfYjBhTU/rQWZcv2lJkflVzFINQxZpmEeSuf3 CEK4r7HA2MQhsU7it1HVtBPBwU4/In3IV/Aq2s9u7KYgMraEviBouHuvnHR1YhLAIs8C LsIf8u5wc1+9Jfd9IQukfkOH4x8cu0KxK+Y+ThpSXl+K36SofLuT48mQWHK0wMjhSQq0 VCaQ== X-Received: by 10.194.235.138 with SMTP id um10mr5088420wjc.30.1380276030061; Fri, 27 Sep 2013 03:00:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.5.9 with HTTP; Fri, 27 Sep 2013 02:59:49 -0700 (PDT) In-Reply-To: <524530F4.7010806@php.net> References: <524530F4.7010806@php.net> Date: Fri, 27 Sep 2013 11:59:49 +0200 Message-ID: To: gooh@php.net Cc: PHP internals list Content-Type: multipart/alternative; boundary=089e01419acc76c49504e75a8e12 Subject: Re: [PHP-DEV] RFC: Automatic Property Initialization From: krebs.seb@gmail.com (Sebastian Krebs) --089e01419acc76c49504e75a8e12 Content-Type: text/plain; charset=ISO-8859-1 2013/9/27 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 simply don't like it to have a concrete method without body. Either abstract without body, or concrete _with_ body. In this case it would mean to have an empty body public function __construct ($this->x) {} but I think that wouldn't be too bad :) > > 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 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- github.com/KingCrunch --089e01419acc76c49504e75a8e12--