Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92041 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3292 invoked from network); 31 Mar 2016 09:22:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Mar 2016 09:22:12 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.52 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.52 mail-wm0-f52.google.com Received: from [74.125.82.52] ([74.125.82.52:35213] helo=mail-wm0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FA/52-24828-24CECF65 for ; Thu, 31 Mar 2016 04:22:12 -0500 Received: by mail-wm0-f52.google.com with SMTP id 191so118988874wmq.0 for ; Thu, 31 Mar 2016 02:22:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=3owkOcbjhQjf6uai0hztlbAZEBVrlCTr8D/Fs4RtfNI=; b=eEPuiOLw0EN7zR4UWaszydP9eHjJ1Yg0lLBXQN8S1tiw5izNoia3jOyg87WzhypEyI xxQ8DJzC8JqQiMyd6XdIzy7HPImb64e3kyb6xHpGeGtDAuy3wAZUFnjRB89t3DT/NzqV g/fnpfL1vIwHlaTyN6b0wiE9GuzKkCiC4Ep6kH730Tsoi5nWhGPuwQ7DqeZCo0nVvqx5 xfXsRWGttfOEls5+CeOGhW4lxukJCwS1bj/kNK7g2FZtvQugSveGz622prORJSvumbcP ah89UbVLtwmyMQ5bLbrYut+bP2Uh5wup+QWGKh2YJtro614OZy6aAOJnUVRBFbGx5Iuy f4jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=3owkOcbjhQjf6uai0hztlbAZEBVrlCTr8D/Fs4RtfNI=; b=VjXhrknVcbcyAIlQzuR3/BGyScMSV+mlaPeV/nQH388tCWPo7iaMwqemmsTNpyPhRD sp0xWwv1cbhz+/bAIsbJ78hV9YlRzPVztPJ/hh4Y01hzHZP2SWdUeyidW8oQO77PtW6b jkDF9Kad5IFxRZOidelAfCesNXLSk5oeRENFmKZF7Zf2ptTrz0vUmvi14460fJN7fEDE Iy6GvdjEpenHihVMgABvHkfH464nyfaODKblnCQTN2yH96Ecf7irPMp3Bt3ufqe3fogP IARBfiX4QKlrUII0RNpgMv4iSVNxjT1G7qZ2kgvztBKOFFTFAhb9/Ybi9BsKGukJcWmk MSzw== X-Gm-Message-State: AD7BkJKRmAYxt42StFrBDViU6ec8Q1mv4tSlFm4UX/gv21CQtzv+nkuT8q7wINzB50iHSQ== X-Received: by 10.28.21.14 with SMTP id 14mr14465517wmv.39.1459416127558; Thu, 31 Mar 2016 02:22:07 -0700 (PDT) Received: from [192.168.0.77] ([93.188.182.58]) by smtp.googlemail.com with ESMTPSA id g3sm8031527wjw.31.2016.03.31.02.22.06 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 31 Mar 2016 02:22:06 -0700 (PDT) To: internals@lists.php.net References: <3F.70.02405.6803BE65@pb1.pair.com> <56F01545.8080008@gmail.com> <56F14572.701@gmail.com> <56F15EF5.80006@telia.com> <56F16023.1010002@gmail.com> <56FC4ED6.6050701@telia.com> Message-ID: <56FCEBCC.8040205@gmail.com> Date: Thu, 31 Mar 2016 10:20:12 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC Discussion] Typed Properties From: rowan.collins@gmail.com (Rowan Collins) Hi Joe, Just my €0.02 Joe Watkins wrote on 31/03/2016 09:34: > public $bar, int $foo; > > What does this mean? > > If it's not an error, what does this mean ? To me, that should be an error; why would you want to group typed and untyped properties on one line? > public $bar, int $foo, $qux; > > If it's an error, why is it an error ? Again, an error, because you are grouping the properties but giving them different types. It's an error for the same reason that "public $foo, private $bar" is an error - the keywords should all come before the list of names, not in the middle of it. > > Both of these examples are just as ambiguous as > > public int $foo, $bar, $qux; To me, this is completely unambiguous - you have three properties, you've grouped them together, so they're all the same. It reads naturally to me as "three properties, with public visibility and int type, called $foo, $bar, and $qux". > Access modifiers are assumed to apply to all declarations in a group, > because that's what grouping is actually for. > > We don't need to make grouping about types, we need to make type > declarations unambiguous. It's not "making grouping about types", it's applying the same rules for grouping types as we apply for grouping visibilities. Regards, -- Rowan Collins [IMSoP]