Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92023 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18631 invoked from network); 30 Mar 2016 12:18:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Mar 2016 12:18:56 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.215.10 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.215.10 mail.experimentalworks.net Received: from [217.114.215.10] ([217.114.215.10:37227] helo=mail.experimentalworks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5D/A5-24137-E24CBF65 for ; Wed, 30 Mar 2016 07:18:55 -0500 Received: by mail.experimentalworks.net (Postfix, from userid 1003) id 4104A42108; Wed, 30 Mar 2016 14:18:52 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on km31408.keymachine.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=4.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.0 X-Spam-HAM-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP Received: from [192.168.2.34] (ppp-46-244-178-165.dynamic.mnet-online.de [46.244.178.165]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: johannes@schlueters.de) by mail.experimentalworks.net (Postfix) with ESMTPSA id C4D9742103; Wed, 30 Mar 2016 14:18:46 +0200 (CEST) Message-ID: <1459340322.18310.6.camel@kuechenschabe> To: Joe Watkins Cc: Dmitry Stogov , Phil Sturgeon , "krakjoe@php.net" , "internals@lists.php.net" Date: Wed, 30 Mar 2016 14:18:42 +0200 In-Reply-To: References: <1458149992.3969.2.camel@kuechenschabe> <1458151531.3969.8.camel@kuechenschabe> <1458153695.3969.16.camel@kuechenschabe> <3F.70.02405.6803BE65@pb1.pair.com> <56F01545.8080008@gmail.com> <56F14572.701@gmail.com> <56F15EF5.80006@telia.com> <56F16023.1010002@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC Discussion] Typed Properties From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Wed, 2016-03-30 at 04:16 +0100, Joe Watkins wrote: > > 2) The handling of multiple properties in the same declaration statement > is inconsistent. > > This feels consistent to me .. in other languages where the type is > required, it makes sense to assume the type is implied. > > In a language where the type is optional, public int $foo, $bar; feels > ambiguous to me. We support $ php -r 'class C { private static $a, $b; } echo new ReflectionClass("C");' [...] - Static properties [2] { Property [ private static $a ] Property [ private static $b ] [...] I believe handling the type attribute like access attributes would be consistent. But well, unless we have typed variables etc. this is inconsistent anyways. Maybe we should actually discuss making PHP fully typed and making that consistent instead of adding one piece of typing step by step. johannes