Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119023 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 15358 invoked from network); 22 Nov 2022 18:08:52 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Nov 2022 18:08:52 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C6A70180044 for ; Tue, 22 Nov 2022 10:08:48 -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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24940 176.9.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 22 Nov 2022 10:08:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1669140526; bh=O6fuK8IZdZFTlnavpbdicmOdw5WnrlQhD5WHTALrSfk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=iMJ/2IZes3avRnf87h4YFA3JZBL3g7caPkGjt/+iE4oCTOVdilsja8f+ztuUAVgAH y6hwBcMgCk0ekxGOUIKxKdrDALK+mPsrjUErDkAuTp5yCSfKMDdVbBKwVm+zXvDIFt SOz1lM6MptdilKtWnZ+Me5PQMp8M70HaGIKEh1e+Gqh291+FLnwfTUlEdVx9LhMuh6 n78afzl9OqTbST3ueZjvuvYvBcp+RzoP+wOWcCRBM63Islohj+OewmrsjyIUigMqT4 ycvxKzLPyQPXecS6pX7oTgZjny2eC7oxj5p3cp6+U8xbwOdU9Yvu0kRxGUIsf955O8 Qwq3KCRC1rWfA== Message-ID: <41b024e3-8310-6bfd-f589-ebe93a76f419@bastelstu.be> Date: Tue, 22 Nov 2022 19:08:43 +0100 MIME-Version: 1.0 Content-Language: en-US To: Claude Pache , Larry Garfield Cc: php internals References: <0854b030-c51c-4c1b-a7dd-22835a1e5da9@app.fastmail.com> <9AB678BC-ACF1-47F0-92A2-6F47AA1CEDBE@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Asymmetric Visibility, with readonly From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=c3=bcsterhus?=) Hi On 11/14/22 21:02, Claude Pache wrote: > To clarify my position: > > * The set visibility must be either more restrictive or of the same restriction level than the get visibility. > > * When the set visibility is absent, it is inferred as following: > * If `readonly` is present, the set visibility is `private` (as of today); > * otherwise, the set visibility is the same as the get visibility (again, as of today). > > * We don’t judge whether it is reasonable to write `protected protected(set) string $foo;` when you could just write `protected string $foo` for the same effect. Similarly, we don’t judge whether it is reasonable to write `public function()` when you could just write `function()` for the same effect. We leave it to coding styles and linters to decide whether the short form or the long form is preferred. > I agree with that. -------------- As I'm sending an email anyway: Larry, will there be a a new separate discussion thread, once all the problems are resolved and once it's clear what you propose? I just noticed the "Abbreviated Form" section in the RFC (https://wiki.php.net/rfc/asymmetric-visibility#abbreviated_form) which I disagree with, which apparently was added in October, but I remember an email letting readers know of the updated RFC. I didn't follow the evolution of the RFC too closely, though, because I believed that it still was in a somewhat early stage and because discussion is already split into way-to-many threads and also the poll. Best regards Tim Düsterhus