Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119107 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 97907 invoked from network); 11 Dec 2022 19:19:25 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Dec 2022 19:19:25 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 05C89180503 for ; Sun, 11 Dec 2022 11:19:25 -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=-0.9 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS29838 64.147.123.0/24 X-Spam-Virus: No X-Envelope-From: Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (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 ; Sun, 11 Dec 2022 11:19:24 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id BA1733200A8C for ; Sun, 11 Dec 2022 14:19:22 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute4.internal (MEProxy); Sun, 11 Dec 2022 14:19:22 -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=1670786362; x=1670872762; bh=e0ac47zlNYF84bO71M5QJ9TbT hJPURF4yLi8PBfXz3c=; b=ZqYOFTzy7YF5/UyYlcG97R9YpRXBB8uS4Vy4Uq1QC NMOzGiGORV8P8dicoe+SjZ3HhP4T7WA5rlCMsGAko2tLrTewFvQejjFAVsHow8Nr MO3dKuUjztxHKeYIWMINbDc59eC/RI6CkZvc4J2FKCrDnPbh2JBbUXhCXGqhvl1V 51p2Ic/Wgf35MdJqCYLMciqjXujabwlOpkrkFrJKKkhVPbcYKRa83dET/cBHMBen e3pzgWMWOd3GKZ5jzDEh7QxCmxP1taXNpW9WG7n/kjb7PcT11i9u6TQ+wfQaEk8u D4fSIRu90UlLtJs4NT6td28c+qeABGaGsrhO4u5eSQ2lA== 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=1670786362; x=1670872762; bh=e 0ac47zlNYF84bO71M5QJ9TbThJPURF4yLi8PBfXz3c=; b=mu30h8UXxounygrDl 0oBpY2IGndlybvK0aeLVYCihcwG7mfn+aVmpM8jLnBRm5Iz4Ih1AIlV5sOvOTj2K T3TZ++HTZKKXGP/gRdiAEx109a71KPtM3duB0QCEiwa7ZV4qsPJD06vcrGzUN4e0 yAsDi0OgNTPi89+a2+TnFF8oGEfnCuqmedcZae51sbF/Ftlz2V+uZFrp5KbOANmx 5vZjKcEyuMlwetLTNlVjkpMYyoVFM/r3ChVTpD8EvXALwix87zCT4U3t6SzO4Mpk YMcs4XoK73CUx4Aqe9M6KYkBNMDbiRubL4KkRGj/P8eRCqSfIuiw+9i3zfjTm6UB qvh5A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeigdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhepgeeghefgteejheeggfeghfelueeggfdtjeeivedv tefhveeguedufeelhedvteeinecuffhomhgrihhnpehphhhprdhnvghtnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhf ihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 125681700089; Sun, 11 Dec 2022 14:19:22 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1115-g8b801eadce-fm-20221102.001-g8b801ead Mime-Version: 1.0 Message-ID: <8f9cf24c-ee77-4227-9b7c-31c631bf8a72@app.fastmail.com> In-Reply-To: <454c5329-d5a3-5174-d09c-346b7d65435c@bastelstu.be> References: <0854b030-c51c-4c1b-a7dd-22835a1e5da9@app.fastmail.com> <831b9906-dc0c-420c-b22f-8a0cc8a1ad64@app.fastmail.com> <454c5329-d5a3-5174-d09c-346b7d65435c@bastelstu.be> Date: Sun, 11 Dec 2022 13:18:59 -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 Thu, Dec 1, 2022, at 12:31 PM, Tim D=C3=BCsterhus wrote: > Hi > > On 11/29/22 21:29, Larry Garfield wrote: >> Thank you everyone for the feedback. Based on this thread, we've mad= e two changes to the RFC: >>=20 >> 1. We've moved readonly back to forbidden with a-viz for now. I've a= dded a section to Future Scope where we really should sort this out in t= he future, but we'll do that in the future when we can all focus on the = various nuances of just that piece. >>=20 >> 2. I rewrote the section on __set to make it clearer. That also incl= uded Ilija and I digging into all the nuances that are already present. = The text may still look a bit complex, but that's because the existing = logic is already complex with readonly. Long story short, the a-viz RFC= does not change anything in the way __set works vis a vis asymmetric vi= sibility; it just inherits and continues what readonly already started, = so it's consistent. >>=20 >> The PR should be updated in the next week or two with the latest chan= ges. Baring any major need for change, we expect to call a vote for it = shortly after New Years. >>=20 > > Okay, then I'd like to officially "request" that the abbreviated form=20 > [1] is dropped: > > I believe 'protected(set) string $foo' is easily confused with=20 > 'protected string $foo' at a simple glance. > > Also any implicit rules are something developers will need to learn by=20 > heart, whereas an explicit 'public protected(set) string $foo' could=20 > reasonably be understood by someone without any PHP experience and som= e=20 > basic experience of OO concepts. > > Having two separate explicit keywords also makes it much clearer that=20 > asymmetric visibility is involved, because it's also asymmetric in the= code. > > I believe the only benefit of the abbreviated form is saving 6=20 > keystrokes (+ one hit to the spacebar) and I don't believe it's worth=20 > the lack of clarity for an important property of the defined property. > > Best regards > Tim D=C3=BCsterhus > > [1] https://wiki.php.net/rfc/asymmetric-visibility#abbreviated_form Does anyone else have feelings on this point? IMO, the shorthand makes = a lot of sense when used with readonly to avoid lines getting just annoy= ingly long, but without it I can see the argument for not allowing it; i= t's about a wash in terms of length with readonly today. I'm comfortabl= e going with the consensus on this one for now. --Larry Garfield