Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69385 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36952 invoked from network); 27 Sep 2013 10:03:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Sep 2013 10:03:29 -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.179 as permitted sender) X-PHP-List-Original-Sender: krebs.seb@gmail.com X-Host-Fingerprint: 209.85.212.179 mail-wi0-f179.google.com Received: from [209.85.212.179] ([209.85.212.179:53024] helo=mail-wi0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FD/A7-28456-0F755425 for ; Fri, 27 Sep 2013 06:03:29 -0400 Received: by mail-wi0-f179.google.com with SMTP id hm2so566315wib.0 for ; Fri, 27 Sep 2013 03:03:26 -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=g3W09j8x6zRorcffEU35dVLMLXXT7oI0E6+KerSoTdk=; b=HtRbbzRgq7uK9RU/WOX3hLCKDvNAdGigkP7k/UfiLg8DxkyOUTbrtSotWk8iFCVgvO mouL6OTgH6+lu/xepYKSHd9XwDenWm4NGE/1FzCq24BhPGUCQitQM2bpbqh03lNftSq+ q0xKOnviNCNHfiD9nqi14iplelaY0PvM43nIkJDK1vs1BdEfijLcAa+Ocef+abj7luRF mJMLzMckIT0J3lQYTQwForH2I8RsjLgyipXEHz+sp3RKOImZlGFEGisnadTONAyGX5sZ LRPNxxT702+E5iJ2zs/xCtnMvmI/X/dzdVWp82XBse8q/zuDdcLQd9vp5HalC1SHrQnz FDfg== X-Received: by 10.194.134.97 with SMTP id pj1mr558473wjb.58.1380276206160; Fri, 27 Sep 2013 03:03:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.5.9 with HTTP; Fri, 27 Sep 2013 03:02:46 -0700 (PDT) In-Reply-To: References: <524530F4.7010806@php.net> Date: Fri, 27 Sep 2013 12:02:46 +0200 Message-ID: To: Matthieu Napoli Cc: PHP internals list Content-Type: multipart/alternative; boundary=089e01228058f5daea04e75a98dd Subject: Re: [PHP-DEV] Re: RFC: Automatic Property Initialization From: krebs.seb@gmail.com (Sebastian Krebs) --089e01228058f5daea04e75a98dd Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 2013/9/27 Matthieu Napoli > Le 27/09/2013 09:17, Gordon Oheim a =E9crit : > > >> 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 really like the proposal. > > I just wonder about how it could mix/conflict with the named parameters > proposal? Given what you said about Reflection ($this->foo is treated lik= e > $foo), then I guess it's not a problem then. > > However maybe the RFC should reflect that you can't use: > > public function __construct($this->foo, $foo) { =85 } > > Also, at first glance I didn't find the "methodless constructor" very > useful (since it's only saving "{}"), but actually the possibility to use > this feature in setters too looks very good, it would avoid a lot of > boilerplate code. Actually I would prefer to get rid of getters/setters completely and finally get _real_ accessor methods like in https://wiki.php.net/rfc/propertygetsetsyntax-v1.2 The ability to shorten the setters is interesting, but it makes them look "asymetric" to their corresponding getter (which still requires a body/code) and anyway: It just patches the symptom, that they are required at all. > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 github.com/KingCrunch --089e01228058f5daea04e75a98dd--