Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119054 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 80369 invoked from network); 30 Nov 2022 01:28:09 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Nov 2022 01:28:09 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5B8591804A9 for ; Tue, 29 Nov 2022 17:28:08 -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_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 out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (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 ; Tue, 29 Nov 2022 17:28:07 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 5E6E85C0095 for ; Tue, 29 Nov 2022 20:28:04 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute4.internal (MEProxy); Tue, 29 Nov 2022 20:28:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc: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=fm1; t=1669771684; x= 1669858084; bh=KKH65JL5yQDkC3qdaWwJIGAU1y9AeB8Emm1kDow+/+4=; b=B G1Zj1pa467A+R2tULnFCi+HJHfaArTCcRd0CYXojCjLHTNWgEuoJy7J+kfVbAeo+ H9rY70UescaUr+jSfwdJykE/hVh0X31F2nxSYxj9idc1EqMl3khAktFHnSbVCbdh CgYjE00RiifLkvQXL+SWat54vHhzATkiuPDVGHRxVt6W/58N7wfq/dGYylpJSqPF gLhg0/tffFsPueTK6tY/rGs1eabRCJYqVK0qpCMJH6uDpyqK2duXikGmv8bZO2CF XdrUsXNCpWjqJJ4zniVGKLIQ/SR+iDyHLlf6vHSuwdho+ci7nT6IYl4ITurRj0s+ JWvMShA1JBwTfGiZA42sA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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= fm1; t=1669771684; x=1669858084; bh=KKH65JL5yQDkC3qdaWwJIGAU1y9A eB8Emm1kDow+/+4=; b=CauYH85xCs8rhwrGK8BOg00FOzxnOV/dJn7o+LzzL8XN W2w+BCNzRez2nIEElWTFlQ57Zbyfy+5O3SxTjRyYyHn516rRF4g9aFy7whlt/u0E QsrTanXSPeifuod7WQTqvZIR/dd9YgPe8E+ybvvtx6WL2+UDpWvYo8Pb5ZP08v4a hwOXEbmC3buyV0F0DlLdMKBZfdxMfQvM1mHeFqvNyC+AXlH7bOrC1ZEAyt5/yWWT eRUwwqwVuhTy628UKigZs0tGfQ1e+mwoHOoPotaqPaRsD+A4/f5Y9AX8IqVXFBak hefgxQkratJYWvvyqVbakm7vJZ1Bvx+05Pz6P3tblA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrtddvgdefhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgrrhhr hicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh eqnecuggftrfgrthhtvghrnhepveehhedvveejledvvefgleevffdtjeekledvkeegheff gfeivdejhffhledtudetnecuffhomhgrihhnpehphhhprdhnvghtnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgv lhguthgvtghhrdgtohhm X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 200001700089; Tue, 29 Nov 2022 20:28:04 -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: In-Reply-To: <434BDABD-8551-46C8-98EC-8CA87952AE25@gmail.com> References: <0854b030-c51c-4c1b-a7dd-22835a1e5da9@app.fastmail.com> <831b9906-dc0c-420c-b22f-8a0cc8a1ad64@app.fastmail.com> <434BDABD-8551-46C8-98EC-8CA87952AE25@gmail.com> Date: Tue, 29 Nov 2022 19:27:41 -0600 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] [RFC] Asymmetric Visibility, with readonly From: larry@garfieldtech.com ("Larry Garfield") On Tue, Nov 29, 2022, at 5:46 PM, Claude Pache wrote: > In the RFC, section Permitted visibility > (https://wiki.php.net/rfc/asymmetric-visibility#permitted_visibility > ): >> The set visibility, if it differs from the main (get) visibility, MUST be strictly lesser than the main visibility. That is, the set visibility may only be protected or private. If the main visibility is protected, set visibility may only be private. Any violation of this rule will result in a compile time error. >> > The first sentence does not forbid `public public(set)`, or `protected > protected(set)`, etc. (the `set` visibility does not differ from the > main visibility), but the rest of the paragraph does not allow it. That > should be clarified. Er. That's exactly what it says: "strictly lesser" than the main visibility. The lines after are just restating it. "public public(set)" is not allowed. (We may relax that in the future to make it compatible with readonly, but that's for later.) > > (Because forbidding `public public(set)`, etc., makes it slightly more > cumbersome to explain the rules, I am slightly in favour not to forbid > it.) > >> There is one exception, that of a private readonly property. That would technically expand to private private(set) readonly, which is allowed. > > That sentence should be deleted, as `readonly` is now forbidden. Good catch, fixed. Thanks. --Larry Garfield