Newsgroups: php.internals
Path: news.php.net
Xref: news.php.net php.internals:119053
Return-Path: <claude.pache@gmail.com>
Delivered-To: mailing list internals@lists.php.net
Received: (qmail 74188 invoked from network); 29 Nov 2022 23:46:56 -0000
Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5)
  by pb1.pair.com with SMTP; 29 Nov 2022 23:46:56 -0000
Received: from php-smtp4.php.net (localhost [127.0.0.1])
	by php-smtp4.php.net (Postfix) with ESMTP id 448481804F8
	for <internals@lists.php.net>; Tue, 29 Nov 2022 15:46:55 -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,FREEMAIL_FROM,HTML_MESSAGE,
	RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,
	T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2
X-Spam-ASN: AS15169 209.85.128.0/17
X-Spam-Virus: No
X-Envelope-From: <claude.pache@gmail.com>
Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43])
	(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 <internals@lists.php.net>; Tue, 29 Nov 2022 15:46:54 -0800 (PST)
Received: by mail-ed1-f43.google.com with SMTP id s12so21917835edd.5
        for <internals@lists.php.net>; Tue, 29 Nov 2022 15:46:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20210112;
        h=references:to:cc:in-reply-to:date:subject:mime-version:message-id
         :from:from:to:cc:subject:date:message-id:reply-to;
        bh=MvB6BAU1ODBrtKP21/S94ydR72UDOJ9L3N+67tyxOdU=;
        b=fuJ7UFCHMklD47ys056Vgtc5So0FHb22RnA2am4aSxAQ3Z2TUOc/mscLeXhmRqUsy/
         zmv3s+QRFAUnQqXJ/qFwLu+swgI9BorWUH29vwEFV5R/RL4dkfGUg0Uj49n3O/CCexgG
         VNeywFOHVrmBjzDG4Ovmp0qZO3+iShsP4R/IBXcjtKINENM2P3mcXdkPUioo0xsRO4Sx
         2tbL2im6+HAaOgbx2Cv2meVcpiCgehQNhaPUqxweHdrL1u7TYBRJ+c6DMoRY0I3ZGkTs
         1LnBg1BQElDc5bqMKmd2h5mXZIVVhNggVHl0L6fA8HyWTXqrTw7vUUPNW8ggmI/FVQ4Y
         65ng==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20210112;
        h=references:to:cc:in-reply-to:date:subject:mime-version:message-id
         :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
        bh=MvB6BAU1ODBrtKP21/S94ydR72UDOJ9L3N+67tyxOdU=;
        b=RFeeJryi/F/abS60gr6Tsq9iDPmfd41QFLl7xwb1knR7G8MmIrKt4u3vwAb9tC/yQg
         yjooQ2C5FKhRWYnqn6QkX02Ml7O2lQocNM2EuuT/aixw4NsidWOVlFtcBkTcTmMES36m
         P/hEOC3EIwI+Zg2292832e5L7wRW+sIxL8WyYHRZ6v7/D8H1xIGzzhYfwvR11LB480Q3
         tz31lbDEjvUTp2CJ6KlJzAcWZYegijdVyKTnevvhH+MSqLIG7kVFASv0o//jvPqQ51Pg
         5HbL0Ivt3CVrBqZvSgY/TYpM90Hj1IZc0Pdy3tILGMsoKwxcFo2QYzq2ZPwODHLuFe3M
         ZG6w==
X-Gm-Message-State: ANoB5pmwp6eoeVYyvVu9myK9CJ6l73p7VkP63itJynyiuGm2CbnD1yZg
	NIKyDr/Twyf3l7akOPxwbsXWs8xLCCw=
X-Google-Smtp-Source: AA0mqf4zNnr8xFVazCZAbe/yBI1dfrONRsWMIxtL2rxbKZbQ3C083WAu7WmiYFwLcTUYEUod9UzR0w==
X-Received: by 2002:a05:6402:530c:b0:462:df63:5ec5 with SMTP id eo12-20020a056402530c00b00462df635ec5mr53714931edb.147.1669765613542;
        Tue, 29 Nov 2022 15:46:53 -0800 (PST)
Received: from smtpclient.apple ([89.249.45.14])
        by smtp.gmail.com with ESMTPSA id r17-20020a1709063d7100b007adf2e4c6f7sm6732458ejf.195.2022.11.29.15.46.52
        (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 29 Nov 2022 15:46:52 -0800 (PST)
Message-ID: <434BDABD-8551-46C8-98EC-8CA87952AE25@gmail.com>
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_C3FAE96F-B3F0-47D5-B2CF-96A6DEEEE21F"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
Date: Wed, 30 Nov 2022 00:46:51 +0100
In-Reply-To: <831b9906-dc0c-420c-b22f-8a0cc8a1ad64@app.fastmail.com>
Cc: php internals <internals@lists.php.net>
To: Larry Garfield <larry@garfieldtech.com>
References: <0854b030-c51c-4c1b-a7dd-22835a1e5da9@app.fastmail.com>
 <831b9906-dc0c-420c-b22f-8a0cc8a1ad64@app.fastmail.com>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
Subject: Re: [PHP-DEV] [RFC] Asymmetric Visibility, with readonly
From: claude.pache@gmail.com (Claude Pache)

--Apple-Mail=_C3FAE96F-B3F0-47D5-B2CF-96A6DEEEE21F
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8



> Le 29 nov. 2022 =C3=A0 21:29, Larry Garfield <larry@garfieldtech.com> =
a =C3=A9crit :
>=20
>=20
> Thank you everyone for the feedback.  Based on this thread, we've made =
two changes to the RFC:
>=20
> 1. We've moved readonly back to forbidden with a-viz for now.  I've =
added a section to Future Scope where we really should sort this out in =
the 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 =
included 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 visibility; 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 =
changes.  Baring any major need for change, we expect to call a vote for =
it shortly after New Years.
>=20
> Thanks all.
>=20
> --Larry Garfield
>=20

Hi,

In the RFC, section Permitted visibility =
(https://wiki.php.net/rfc/asymmetric-visibility#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.
>=20
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.

(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.

=E2=80=94Claude=

--Apple-Mail=_C3FAE96F-B3F0-47D5-B2CF-96A6DEEEE21F--