Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124563 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 8AD521A00B7 for ; Tue, 23 Jul 2024 16:45:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1721753238; bh=kHuBKkNdtc84Fp7aP/DSPwDeD0dGFuAzCM/eyFTzj/c=; h=In-Reply-To:References:Date:From:To:Subject:From; b=inEyNIwTwPWq+VASECoDzzqrco3x6gWC0jopAe3oysickMYO93fE/0/0XVLkmDsZy yaUISN/DnVv5giysMRhfZhTuBEPf1A4acA3PQeiuCXrkw+E8/r3IMuKnrphVL9dXdz U4hXEXpshLThiY31XysoL3e1XwNFYCC9eHGPkIEPEDQAuSph6XvF9THJrNl8jS8jGe +jskT+SQga1kFaIvJV3q4kh4qkg74nLNY9gD/yi6O7BscrNbljHb5TY9EFksATrY2x pVNwf0JLNsURusqlMHeV7/81SFUF2w8i1StKxkKt8uk4WHtAiUZdEHozUccSS3xoAa dIidVHEiztitw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 798DD18007F for ; Tue, 23 Jul 2024 16:47:17 +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)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 23 Jul 2024 16:47:16 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfout.nyi.internal (Postfix) with ESMTP id 185D213801D7 for ; Tue, 23 Jul 2024 12:45:42 -0400 (EDT) Received: from wimap23 ([10.202.2.83]) by compute3.internal (MEProxy); Tue, 23 Jul 2024 12:45:42 -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=1721753142; x=1721839542; bh=0CEHpiv6GiD3ZNc2lH3b2 h01BnXlJ0hMytShAEznHpw=; b=fP77Iz3DebYFN3WGzB62jqTHjvAWB8nIHKoWE DF/yStqkTEcxt+ttV8p9sSyR2WYQYED5uGzu0mA5utj+Fn8jOl0J45+U7FoTYd9F 7sA2+yjdO/zfsemBdg8f4UmrnyaNMEcj4VIFib1T/0oAHiLhVis9lYkEnBf9SINm tIRU5ZxxGgspOG/Whkx4j4PVaYf2FlbQGh3KVMzt0S0a7Y34x1qaf4plXN57L+rF apeZPaFmuwDsCSJksx7OcgPClikA8rXjqr5zIujQ41VY6URvub50glO+YzRwtZjy pqcT9sRetn/qTuh5fqQlD+hErw955bHd7dydgChPazyDHN8Fg== 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=1721753142; x= 1721839542; bh=0CEHpiv6GiD3ZNc2lH3b2h01BnXlJ0hMytShAEznHpw=; b=h yK7wS7xM0S1MnsDJ3deCuRrVJVijB0aBzi76ElHFvnPWd9AYmw7A4TixjBTwbCIn oAz4R/DGZwezfG+GVIlVyMu/K0NTZli/zsIkwdClXnswC+QV2na00JU5PogxYTZ8 ZrITYiqTxmYUzIEMU2jyVx7taL4kKez9ersbq8cApe7LdN7AtjsBRCufWljk4Xqf ICYSX+3CACb+4lpMHlSDRD/zSmtq+L+V92tK2F8e+Plz39gNO8pwR4dn75i3P/90 3Mfr5f15X2GQhTOlyGZs/Zgo/JUBlOuz8fBnJC4bzWqJmnUvyewSCj7XzWbsEGJk IB+QVARNmxUKYP9bqUyyA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrheelgddutdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhepffffffejffdugfegvedviedttedvgfejffefffej leefjeetveehgefhhfdvgfelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmpdhnsggp rhgtphhtthhopedt X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id B68C02920062; Tue, 23 Jul 2024 12:45:41 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-582-g5a02f8850-fm-20240719.002-g5a02f885 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Message-ID: <4de40957-9184-43ca-a7b9-4b325003d717@app.fastmail.com> In-Reply-To: References: <0a6a61cd-f203-4dea-a7f8-97e6b885c52d@app.fastmail.com> Date: Tue, 23 Jul 2024 16:45:20 +0000 To: "php internals" Subject: Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Mon, Jul 22, 2024, at 7:07 PM, Tim D=C3=BCsterhus wrote: > Hi > > On 7/20/24 03:14, Larry Garfield wrote: >> Baring any new developments, we plan to start the vote early next wee= k. > > I've went through the RFC once more. I have the following remarks: > >> For that reason, a private(set) property is automatically final and m= ay not be redeclared at all. >>=20 > > I assume that explicitly marking it as final is still allowed (just=20 > redundant)? Correct. I have added a comment to that effect. >> There is one caveat regarding virtual properties that have no set ope= ration. If there is no set operation defined on a property, then it is n= onsensical to specify a visibility for it. That case will trigger a comp= ile error. For example: >>=20 > > How does this interact with inheritance? Consider the following exampl= e: > > class P { > public $answer { get =3D> 42; } > } > > class C extends P { > public protected(set) $answer { get =3D> 42; set =3D> 'dummy'= ; } > } > > This could be considered to be both narrowing the `set` visibility fro= m=20 > `public` to `protected` (which is unsound), but also widening it from=20 > =E2=80=9Cnever=E2=80=9D to `protected` (which would be sound). I checked with Ilija, and confirmed that it's the second. I have update= d the RFC accordingly to make that explicit. >> as it's possible now for a property to be visible but not writeable. = For the time being, > > I dislike the =E2=80=9Cfor the time being=E2=80=9D phrasing, because c= hanging that would=20 > effectively result in a breaking change, because the __set() may be=20 > called in situations that were not anticipated. I would have preferred= a=20 > stronger phrasing that makes it clear that the RFC authors know what=20 > they are talking about. > > Best regards > Tim D=C3=BCsterhus I wordsmithed this a bit further. We're not trying to be wishy-washy. = Rather, there are a couple of knock-on implications that are worth discu= ssing that we consider off topic, but the approach we're taking does not= preclude them. We're deliberately taking the conservative approach. A= dding a __set fallback in the future would not be a BC break, as it woul= d be changing a hard error condition to a legal condition, which is some= thing nearly all new features do. We don't think it's wise to do that, = but if someone wanted to advocate for that in the future we're not precl= uding it. If none of those further discussions happen, we still conside= r this behavior complete and acceptable. --Larry Garfield