Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71909 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85964 invoked from network); 31 Jan 2014 23:48:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jan 2014 23:48:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 209.85.160.173 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 209.85.160.173 mail-yk0-f173.google.com Received: from [209.85.160.173] ([209.85.160.173:53888] helo=mail-yk0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2C/86-54292-C363CE25 for ; Fri, 31 Jan 2014 18:48:14 -0500 Received: by mail-yk0-f173.google.com with SMTP id 20so27743114yks.4 for ; Fri, 31 Jan 2014 15:48:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=vMG07DX+x64BvuSvG1TMtnwYXyiXsmZH7KSxGUlXvXw=; b=OYI/rrotNYAesQqkybIqZptqLGdPzmuxq6T9o21L7t43Av+yUmT0HATD6TgZT4H2ph 2PCeA9AqrkbLGg2OYjV2+kie8G2T80judlj0Nox8nZpirRhr92xehhdzHtJRSBAqHlXA czbWR0oSez6GTTkNBd37wrb/uCVtgRfuLGwSh5kgYFIMVpb4Ooe82oLq6bAYda9qaStk lI68EKbYXNVgEKJLHe8pvCojFmFYVvbCt3Hp0apjFbs8161HRAaC369zSWDU6lMeRifX 7MeAcf3RYI7Zet7vNIklzqtPbviINj6Sg0071ybboL+n8RfXVTDYlzDQ4xn/veIsa7Lb iEdw== X-Gm-Message-State: ALoCoQly85obdo8uxka2aPewE/rPb3yeOvur3MiMscvmid+ph0uW+vPhjBGMQZhbNPk5S2zS06d3 MIME-Version: 1.0 X-Received: by 10.236.2.166 with SMTP id 26mr4064813yhf.79.1391212089258; Fri, 31 Jan 2014 15:48:09 -0800 (PST) Received: by 10.170.57.137 with HTTP; Fri, 31 Jan 2014 15:48:09 -0800 (PST) X-Originating-IP: [89.240.52.161] In-Reply-To: <1391210014.2941.224.camel@guybrush> References: <98.E0.35265.E17FBE25@pb1.pair.com> <1391203805.2941.173.camel@guybrush> <1391210014.2941.224.camel@guybrush> Date: Fri, 31 Jan 2014 23:48:09 +0000 Message-ID: To: =?ISO-8859-1?Q?Johannes_Schl=FCter?= Cc: Pascal Chevrel , "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [VOTE] Automatic Property Initialization From: danack@basereality.com (Dan Ackroyd) Hi Johannes, Johannes wrote: > from a quick look at it there seems to be a design flaw > around inheritance with code like this: That example is equivalent to calling the parent constuctor like this: class Base { public $p; function __construct($this->p =3D 42); } Class E extends Base { function __construct($value) { $this->p =3D $value; parent::__construct(); } } So yes - you need will still need to pass parameters to a parent constructor that requires them, but that is the same as the current situation. Johannes wrote: > also > class C { public function m($foo->prop){}} > becomes valid syntax Nope, it's constructors only. From the patch, the following errors can be triggered: "Automatic property initialization can only be used inside a class" "Automatic property initialization can only be used in a constructor" "Automatic property initialization can not be used in an abstract method" If you try to use the syntax outside of a constructor function. cheers Dan On Fri, Jan 31, 2014 at 11:13 PM, Johannes Schl=FCter wrote: > Hi Pascal, > > On Fri, 2014-01-31 at 23:41 +0100, Pascal Chevrel wrote: >> Out of curiosity I read both the Voting and Release Process RFCs and >> couldn't find any mention of a rule stating that all votes had to be >> approved before the first alpha, if I overlooked it, please correct me. >> Also, If you look at the wikipedia definition of an alpha in, I believe >> that it is still time to add features: > > No, that rule wasn't written down, but the release process came to live > out of consequence of us pushing things in quite late in the game and I > fear we run exactly in the same direction, again. > >> Also, isn't it to the Release Manager role to make such decisions? > [...] >> The document linked is: >> https://wiki.php.net/todo/php56#timetable > [...] >> The RFC was created before the first alpha, the voting phase is now and >> if the result of the vote is a yes, then it has until mid-March to be >> included. At least that's how I read it. > > Yes, there is no strict rule, but still we're not talking about a small > change here but a language change (a small language change, but still) > and I merely wish that this fact is considered by voters. Ideally the > proposer would have added options for 5.6 and the following version. > > > (Actually I hadn't reviewed the proposal before and from a quick look at > it there seems to be a design flaw around inheritance with code like > this: > class Base { public $p; function __construct($this->p =3D 42); } > Class E extends Base { function __construct($this->p =3D 23) { parent:= :__construct(); } > new E; > leading to probably unexpected results ... also > class C { public function m($foo->prop){}} > becomes valid syntax and leads to (fatal) runtime errors, this might > even be true for non-class function declarations ... but I haven't > really checked, I assume voters will) > > johannes > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >