Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91704 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23009 invoked from network); 16 Mar 2016 18:15:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Mar 2016 18:15:27 -0000 Authentication-Results: pb1.pair.com header.from=bobwei9@hotmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bobwei9@hotmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.com designates 65.55.111.100 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.100 blu004-omc2s25.hotmail.com Received: from [65.55.111.100] ([65.55.111.100:58118] helo=BLU004-OMC2S25.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 39/EA-48430-EB2A9E65 for ; Wed, 16 Mar 2016 13:15:27 -0500 Received: from BLU436-SMTP209 ([65.55.111.72]) by BLU004-OMC2S25.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Wed, 16 Mar 2016 11:15:23 -0700 X-TMN: [shs+dcieW9pmo/U9wL5Sg8T+C0JJlBa/] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) In-Reply-To: <1458151531.3969.8.camel@kuechenschabe> Date: Wed, 16 Mar 2016 19:15:18 +0100 CC: Phil Sturgeon , "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable References: <1458149992.3969.2.camel@kuechenschabe> <1458151531.3969.8.camel@kuechenschabe> To: =?utf-8?Q?Johannes_Schl=C3=BCter?= X-Mailer: Apple Mail (2.3112) X-OriginalArrivalTime: 16 Mar 2016 18:15:21.0338 (UTC) FILETIME=[CD73D5A0:01D17FAF] Subject: Re: [PHP-DEV] [RFC Discussion] Typed Properties From: bobwei9@hotmail.com (Bob Weinand) > Am 16.03.2016 um 19:05 schrieb Johannes Schl=C3=BCter = : >=20 > On Wed, 2016-03-16 at 18:50 +0100, Bob Weinand wrote: >> The patch currently prevents that. >> It prevents all creation of references to properties. >=20 > To all properties? Thus >=20 > class C { > private $data =3D []; // No type, old code >=20 > public function sort() { > sort($this->data); > } > } >=20 > won't work anymore? - I think that's a major break to the language. >=20 > Workaround then would be: >=20 > class C { > private $data =3D []; // No type, old code >=20 > public function sort() { > $data =3D $this->data; > sort($data); > $this->data =3D $data; > } > } >=20 > Or is there a simpler way? - Quite ugly and quite some migration pain. Eih, only to typed properties. Everything else would be insane ;-) Sorry for being imprecise. >> The reason is technical: >> We'd basically need typed zvals. >> Or add some sort of write callback to typed references. >=20 > That matches my assumption. >=20 >=20 > Slightly un-serious: >=20 >> If you have a clean solution to these issues, you're more than = welcome to contribute here. >=20 > - No typing > - No references >=20 > :-D E_BC_BREAK :-P > johannes Bob=