Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124770 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 1DA5B1A00B7 for ; Mon, 5 Aug 2024 15:37:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1722872322; bh=D5SmEhglq9E8+UIn3laNMZVFR8+dmrQBzDpri8wE5Iw=; h=Date:From:To:In-Reply-To:References:Subject:From; b=CwaxEazjFqQu1KHgnU4RFQ5RQFw2/fsQbK2RTDeuL1mG22nhYVobdALKJVUB1y2Cg ZMeX49T9gw6btB8hMyJCxWZRZ7Q462nPQlNkIYR7K5P0DIfXMJn76HVgZ1MmK9BXhR xj5vct+w7xxrflnvWFdFj2b7cz5VL+8QH44IWhcpHx2gVF+EBYOGwSZAWafFdu1B0O 0nnIOCgLxE4kWqT7TVfKm8JDTVYG0pBOm4XCdauKLFsdV0Ubk7mW7TdDwHd0a4iCVO AU/h7x4alK2XGJY5CjMxBtVPqm3LBPlfNYVdV3/4iCOvhK7XM/EBsGm4y7qwgS9vnN nc/q/gZPhg2Dw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F0DE218007B for ; Mon, 5 Aug 2024 15:38:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fout3-smtp.messagingengine.com (fout3-smtp.messagingengine.com [103.168.172.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 5 Aug 2024 15:38:41 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfout.nyi.internal (Postfix) with ESMTP id 278CB13880A7 for ; Mon, 5 Aug 2024 11:37:00 -0400 (EDT) Received: from wimap23 ([10.202.2.83]) by compute3.internal (MEProxy); Mon, 05 Aug 2024 11:37:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm3; t=1722872220; x=1722958620; bh=oepIPEXtYyP+OuQm7u4Y/ IOu0NupWw8hUdVpFDs0UHw=; b=qr3a9bBQURRooJylXayue3/8vWbVav1zvZFWy 77Atr6332psiKyfgV/4rFvX3s6+ydHd7uCMm9DjQZIfTZ+0hKJJYAyy13+uwrgDz S2Bq3waYnCzkIm1b6DgRuoba9AzjY8lBCfD/kA58S3hhUFuqXhXWOH+hVS8/FeA+ UvyryRNn4IPgQtEtr8hYbNwigRm1J4tkGWOMbkSptBKuPtx9MFn4SIS05d0ZEHCf ulV5OpCArTocQAF3RANBSAWHu31jba5q9Z0S3EG05bqbhJOBzE4fad8YpmRnvbJ0 XRKyskWR8ACYf1F2ZbAxGj+KepUbASy+91b0PdXDLs+hBIfFQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1722872220; x= 1722958620; bh=oepIPEXtYyP+OuQm7u4Y/IOu0NupWw8hUdVpFDs0UHw=; b=l PYnXZ0haSCM8ERYdbV2Y9Krp7tM+FjdetwRcC/3WIZSusXLAaZuSiWqifDRMqPtE 0zJ/2HWmfwSSa71/i6De7q+0/scCk+mFb+ydc9w3MNiVvTdaHkcqz/szZm3L8XOf dVQbTHHpALOHeBm1i1yDMzlsc166TBjF6n3WXFI9P6ZWIoHr5higljGcxKp/p5d8 DzeYBFVuwzmuqXGmlRCPBIuSeW9LUnv4XebviY2iNghNXYBT6kS9OZXjka5HhNV0 a+Jj2EDWv0AbVLEtJ60kyjONrGRuLI+hsCSgCIk9ltWQQHnHR4gmNoJgd3oVevnh CnYCKrVNJN+1QN5LeH9BA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrkeeigdelvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefoggffhffvkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedfnfgrrhhr hicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh eqnecuggftrfgrthhtvghrnhepueevvdduhffffffhleeuhedvjeevgfelgeetgefftedu feelheegfedvheegleetnecuffhomhgrihhnpehphhhprdhnvghtnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgv lhguthgvtghhrdgtohhmpdhnsggprhgtphhtthhopedt X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id D67072920063; Mon, 5 Aug 2024 11:36:59 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Mon, 05 Aug 2024 10:36:39 -0500 To: "php internals" Message-ID: <01ebb534-2b0c-4e5f-b4d4-a5f81b2db798@app.fastmail.com> In-Reply-To: References: Subject: Re: [PHP-DEV] [Vote] Asymmetric visibility v2 Content-Type: text/plain Content-Transfer-Encoding: 7bit From: larry@garfieldtech.com ("Larry Garfield") On Mon, Aug 5, 2024, at 8:49 AM, Theodore Brown wrote: > On Fri, July 26, 2024 at 12:25 Larry Garfield wrote: > >> Voting for Asymmetric Visibility is now open. >> >> https://wiki.php.net/rfc/asymmetric-visibility-v2 > > Hi Larry and Ilija, > > Thank you for all your work on this RFC! > > One part that doesn't make sense to me is this sentence near the end in > the "Readonly is incompatible with inheritance" section: > >> With asymmetric visibility, the `readonly` usage here can be replaced with `protected protected(set)` or `readonly protected protected(set)`, avoiding the need to double-declare properties. > > `protected protected(set)` just removes readonly, and is the same as > `protected`, right? So couldn't such a change be done now without > asymmetric visibility? > > And the change to `protected protected(set) readonly` as shown in the > example also seems unnecessary, since earlier in the RFC it says that > readonly will be changed to imply `protected(set)` rather than > `private(set)`. So it seems that no change is needed to the abstract > class here - the properties can remain `protected readonly`, and the > implementation can be simplified since readonly properties will now > imply `protected(set)`. > > Or have I misunderstood something here? I believe in this case you're correct. That example was written early on, before we decided to expand readonly to protected(set) by default. I didn't realize that needed to be updated as well. Yes, in this case, the widening of readonly would also resolve that issue. `protected protected(set)` would now be redundant, but not hurt anything, whereas `protected private(set)` would have an effect. `public public(set) readonly` would also be legal (though I don't personally know why you'd do that, there's no inherent reason to make it illegal). --Larry Garfield