Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119254 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 82859 invoked from network); 10 Jan 2023 17:19:46 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Jan 2023 17:19:46 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 68D09180554 for ; Tue, 10 Jan 2023 09:19:45 -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.0 required=5.0 tests=BAYES_40,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8560 212.227.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.187]) (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, 10 Jan 2023 09:19:44 -0800 (PST) Received: from [192.168.178.22] ([213.54.146.76]) by mrelayeu.kundenserver.de (mreue011 [213.165.67.97]) with ESMTPSA (Nemesis) id 1Ma1oK-1pIfwg46IW-00VzjV for ; Tue, 10 Jan 2023 18:19:43 +0100 Message-ID: Date: Tue, 10 Jan 2023 18:19:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Content-Language: de-DE-frami, en-US References: To: php internals In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:nwAL7DTG//jFq+06D70i7My+szdpFtuF/iNlGuPPChIy99XQOUn 3pVEzxrZ9K6MiqU2riNslaruhdw42apj6WV4BX5lt5L59PZzbJ19M1IOADRMX9fOrWCiZoS vPVtxb4BnObjnomEmcLTy+rNt91cXYUAb44hrs5wIItJYhPPTpp3bJsDk09CZyHS5hI7MVe k3nL8vRZoibzSNHjvwukA== UI-OutboundReport: notjunk:1;M01:P0:Hsq0ts+yWhM=;1Vyf8eB5WuHNy7pg0Je2E4DajwU 0PSL4uk+jkJfFCR1ze6xKPcIHzX9wice4aUBmxInVE8Ly3yGdOtFNihCfCMLktB+AU82GsXdb yqB9i4lzGgyaRY6a22zw/2Xs//qo+Xmh4Oyg4lJC9XaWZu8h+0cyVtGPRj0AU6i7fA1rBtySa NquhrDEGRtGsRHp3E20sjdG3B+wRt2mYU6Tzs0yXYe87aQz9iFwtiuz0jAP9TfNaZ/HwYaKFk 2Xes5HDy4Jsj3etotof0ZwpV1p/fPMXGsvwCePRDdRomjfhUEV0YoGmBpufo6ycorsBsdEqgw iE9QTnSak4+P/ZqsqLCP+4j1YgJeHLDE9cpStXJjtkKslHZSboC49JnC+GYbz8dq+YMV0M0Qs doK5gg4mZ2WZ6dFbp36IknIcAsRKMOqfetWDns2gWzkNyoRVEzMsBVQcT1qn6pTi7SCnZLBmI T1jiP6gWuxmFhs+aU/j/c+LAp9ASwZAlBO5guOJ4I+8LDDT5KIqQdqSGhxPaOXokJTmQVQhaH to841flDTkrLwDj1wK8gsIQb6JBnT1GLUhR9znSAm0Rs6aoHxu2Sx1+RAQt4JHzxfMPIdOqgv Dd9ZuZ7+b/e1hsorRxh3NIe8njP5hJBVlUmMSsvaOKMOa/q82Hw/vjC3wKnruYAjWwijOZ7yG qdsJUM6huoQ2MnnJOpSv9e82Qv7Raca7ypuYdObsbw== Subject: Re: [PHP-DEV] [RFC][Vote] Asymmetric Visibility From: thomas@nunninger.info (Thomas Nunninger) Hi, I was looking at the current vote of this RFC and I stumbled upon Theodore's remark that the RFC feels unfinished as it can't be used in conjunction with readonly properties/classes. The RFC disallows (for the time being) the mixing of readonly with explicit asymmetric visibility. And I was happy about it. Thus I didn't feel the need to comment about it so far. The main motivation given in the readonly RFC was value objects. And as far as I understand, one of the main reasons was to reduce boilerplate code (esp. public getters). readonly works fine for value objects. But looking at entities, there is no solution so far. Thus I still (might) need to provide public getters. And because of the limitations of readonly, there was/is a need for asymmetric visibility. I doubt, there would be any need for readonly if we would have had asymmetric visibility first. And (using asymmetric visibility) I assume, developers should be able to ensure that a property is 1. only initialized once, 2. inside the limited scope of a class, and 3. not overwritten during the lifetime of the object. I'd be interested in a use case where you would really like to ensure this on the engine level. To go one step further, I would even ask the heretical question if we should discourage/deprecate readonly once we have asymmetric visibility. ;-) Regards Thomas Am 07.01.23 um 00:37 schrieb Larry Garfield: > I am hereby opening the vote on the Asymmetric Visibility RFC: > > https://wiki.php.net/rfc/asymmetric-visibility > > Voting will be open for 2 weeks. > > While we would certainly prefer if everyone voted in favor, for those who vote against the authors kindly request that you indicate why, using the second poll question or comment section afterward. Thank you. >