Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119227 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 61033 invoked from network); 4 Jan 2023 20:29:10 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Jan 2023 20:29:10 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E6A93180543 for ; Wed, 4 Jan 2023 12:29:09 -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=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,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 out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (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, 4 Jan 2023 12:29:09 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 0BD2E5C00EC for ; Wed, 4 Jan 2023 15:29:09 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute4.internal (MEProxy); Wed, 04 Jan 2023 15:29:09 -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=1672864149; x=1672950549; bh=pMfwPazBF+Fw+0p9vZgXBjULw GZGDVGgsdV0LVzWQjI=; b=jvVcFMcOSnbAVnJv9HnUJxXYNeA3FeU5EOL/51fgG RfC4hBM/Fsm5YT5sOLCvOD5N2gEUoJfFyoCIpCj4ULS/t4yj9bwdvzI3dGZwyuh+ DFXnQHQDTFuHf4lIVIFo1N3dUZ4TqSMpHV1AIZ4JsEUotf4iG2Gsc+AwUXBtijVo MPcZCe9xFnk7dmAE5IIzHJ76VqpUg3plMP1b5TbeC0SpX8il2M4ulC9nd5W5yXoc Hyxn6G1lDBpjVQv0komTQ19RmBZZ5MxMYVV7Pz8zEb0VVIFi90Mm7QYuqk49xdGb M3gjYtwRck1zArtZkaFfGV/MfSND9dkl5xtqz/MwIqCjg== 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=1672864149; x=1672950549; bh=p MfwPazBF+Fw+0p9vZgXBjULwGZGDVGgsdV0LVzWQjI=; b=VlXCGM7n8mWMLZgf4 Qvzz5XLGyXULnq77Y7ZVTjWS7oskkUyq7ZBjA+JfavsZ7Gz7noYeetD51IqWEpCy zwGQ0MINvMBq9ekyEHFS4MrNvL8BxSIVOlfXUNIzbKJ+CNng5Y/JazfRinIY7Dbl MFgSYZFMqRqzxROGSeDjDlYHj9iG3KAJZEKV4lNrYdwCW2dCLGvDSJq+KfCGosqP QXaFYWHkq8tSRfmnG1JdmmZoqbiJvIQTj4WyvE0cOUGXlRZ8R2hRpTeKyWMvdasv +qEer/KdXSXKHQzamHMWj8TR6q31BuBt4d6NJpooFFvKDhd8EAoVoXtnxEYFg7XC FJrMg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrjeeigddufeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhepffffffejffdugfegvedviedttedvgfejffefffej leefjeetveehgefhhfdvgfelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id CBCBE1700089; Wed, 4 Jan 2023 15:29:08 -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: <845495d8-52da-4d2e-90ee-79c697d87f30@app.fastmail.com> In-Reply-To: <3d8561bd-fdb1-417a-836b-5146fca56185@app.fastmail.com> 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> <3d8561bd-fdb1-417a-836b-5146fca56185@app.fastmail.com> Date: Wed, 04 Jan 2023 14:28: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 Wed, Dec 21, 2022, at 3:23 PM, Larry Garfield wrote: > 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 error= s: >>>=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 m= ost controversial one: `protected(set)`) and not in other cases...? Beca= use 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 declara= tions like=20 >> `public $a` and `public int $b` is probably not a good idea, because = it=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=20 > form at all dislike it, so we've removed it for now and left a mention=20 > in future-scope. A future RFC can add that if desired. > > That should, I think, be the final change to the asymmetric visibility=20 > RFC. Baring anything else coming up, I expect to call the vote=20 > sometime the week of 2 January. > > Happy $holiday! > > --Larry Garfield Happy New Year, PHP. Fair warning, I will be opening the vote for asymm= etric visibility on Friday, baring any sudden new inputs in the next 40-= ish hours. --Larry Garfield