Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119196 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 67302 invoked from network); 21 Dec 2022 21:24:20 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 21 Dec 2022 21:24:20 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0B0531804FF for ; Wed, 21 Dec 2022 13:24:20 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS19151 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 21 Dec 2022 13:24:19 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 23FDF5C00B7 for ; Wed, 21 Dec 2022 16:24:19 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute4.internal (MEProxy); Wed, 21 Dec 2022 16:24:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to; s=fm2; t=1671657859; x=1671744259; bh=M6QSB+WWiHJu4clUWFwlEGJFp mBh45/ZOwO0QqfcMbY=; b=AO5YH9Wgifm3NoFVzxjLayfDtvL+awCj2yoO+tN4e tdMXwr74gALWqaMOcS7slhSV2oy8yRPi0DkxKBRLaqwviHUTX9qwAkq/16Rboefc +XURdJXagotLt9eB9cIGd/YyNU3fSa4WLeCXbfyVCGTMjsljGcbd0UCC8DYdVUYD EfTbIzzWs3I+vs/7Q1DdvSXGtZAzA+MK3Qkcu5TAJRXmMScxRUgDQAF2ySNYEZ1n H7vTEeGEKUR8kTNhvT9lmwoAzPIM32/DUqxr2VFUyM5iQCe4zzNRwcfpnLwY71ef 1+OubZHPjzFdoHUSB8wkBUogeZMYo/zyqenGvSSgGCtpQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1671657859; x=1671744259; bh=M 6QSB+WWiHJu4clUWFwlEGJFpmBh45/ZOwO0QqfcMbY=; b=DDkIBXT/sWnfr7ggI etxm7WphupUW/5/goARYR7tywABT4nuJIuhIwXbkeJ4Uz4W5B/ARz+HjVzMGF0bH syEEl/A/Nl6inJvj4jMFhcH46opf3XbH7EBEmJ4d4B+/uf9x9MnEJF+tgfFcInc1 GHcE8lIcdvBBOeomSa8eF20kljU5Jdc/QIsCTPvdUu2bwmmL7Nv0cv36ItMNB+J4 eRUnMk+lMY694hzR344Jr80d18oyrwYGSk/qyO7dn2XeWVA2dz+GYXSFJsKSC82H nW4e0+QzNTFoU0XKuLK8duCg6W5YCh8Yx0kXChOgUzXOpBFeIXUSvwX3ZI91fDrz QF2qA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeekgddugeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhepffffffejffdugfegvedviedttedvgfejffefffej leefjeetveehgefhhfdvgfelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id E4EB41700089; Wed, 21 Dec 2022 16:24:18 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1185-g841157300a-fm-20221208.002-g84115730 Mime-Version: 1.0 Message-ID: <3d8561bd-fdb1-417a-836b-5146fca56185@app.fastmail.com> In-Reply-To: References: <0854b030-c51c-4c1b-a7dd-22835a1e5da9@app.fastmail.com> <831b9906-dc0c-420c-b22f-8a0cc8a1ad64@app.fastmail.com> <454c5329-d5a3-5174-d09c-346b7d65435c@bastelstu.be> <8f9cf24c-ee77-4227-9b7c-31c631bf8a72@app.fastmail.com> <84647C1B-0F61-41E5-981D-B860BE1E53CB@gmail.com> Date: Wed, 21 Dec 2022 15:23:47 -0600 To: "php internals" Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Asymmetric Visibility, with readonly From: larry@garfieldtech.com ("Larry Garfield") On Tue, Dec 13, 2022, at 11:03 AM, Claude Pache wrote: >> Le 13 d=C3=A9c. 2022 =C3=A0 16:34, Claude Pache a =C3=A9crit : >>=20 >>=20 >> Hi, >>=20 >> As of today, the following declarations are rejected as syntax errors: >>=20 >> ```php >> class C { >> $a; >> int $b; >> } >> ``` >>=20 >> while the following declarations are accepted with implicit `public` = visibility: >>=20 >> ```php >> class C { >> static $c; >> readonly int $d; >> } >> ``` >>=20 >> It would be reasonable to propose to allow to consistently omit the `= public` keyword. But allowing to omit it in some cases (including the mo= st controversial one: `protected(set)`) and not in other cases...? Becau= se of this inconsistency, people are incited to always write explicitly = `public` anyway. >>=20 >> =E2=80=94Claude > > > However, I=E2=80=99m just realising that omitting `public` in declarat= ions like=20 > `public $a` and `public int $b` is probably not a good idea, because i= t=20 > is incompatible with constructor property promotion, as `function=20 > __construct(public int $b) { }`, and `function __construct(int $b) { }= `=20 > have different meanings. > > =E2=80=94Claude Well, it seems the only people who have opinions on the abbreviated form= at all dislike it, so we've removed it for now and left a mention in fu= ture-scope. A future RFC can add that if desired. That should, I think, be the final change to the asymmetric visibility R= FC. Baring anything else coming up, I expect to call the vote sometime = the week of 2 January. Happy $holiday! --Larry Garfield