Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123481 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 3D12C1A009C for ; Fri, 31 May 2024 21:27:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1717190891; bh=dNvmgOwUqPIQNzWGMXNo/ZXmltVN7dOVBC34b35I52o=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=EzgWF3A4uP8p6oWxeFt2mYQ0Z2gFt7t0M2Orio7jecyRKC+/G+X/uMWLYOY59yYCA KpW1fAAjhQngnCDhUgWsbCx4rXQTShn6oufeHT113+y7qGoSTqMNKpl4xj4esBkr9R zENCef2IUmy9aGc8IJcOTDt/5O6XDR3hoj6XzTYjgOhVlxI4wWOR8rZ1MsvWqHVuGO 0Np4nItw2oJYMG//TcJ36Y95Z4NcrWHebdXPVlGtdKB4d0lHn7cvsx86alZPpa5w96 53Lu3VEC3FNmfswk1it/qgGC96uDxbbkyuFVsG7KjeW2Idnj8aDQV1VvtQGK/f1YzK eq1X3LNxR9Ucw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6622C1806AB for ; Fri, 31 May 2024 21:28:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 31 May 2024 21:28:09 +0000 (UTC) Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2ea9afcb22aso8680631fa.1 for ; Fri, 31 May 2024 14:27:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717190826; x=1717795626; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TAUDxzrtqj/ICHE+ae4vzYlj58PmB4nUgngJLRxHF3Y=; b=OOrQP5oEXPvGZmJUjUz5S4LirTt59YA7VjRfjK5Ij0h6bZdXf03NGefwWeUAa3oY7O e28g7EuiXwjhwQVj2hFg9Us3mciIwhJTaOHMn29qaJ/rEY36h6j6GvrdXsyxwon5Ln5f RRkLwkJnFN24TCWGCJR6WoquWa1bNSHbeLdKakUykyO1s1YjSjYkEaQ1BV4lJNPVU2TZ blXYDvOW5x2f1IjCP4Jj+lOBFKPiF1iJW5O1bvIyAZEjli94mn+zeRd2+UhRb5tIAvBV FLOJEzQXaW6TMiCqXNs+pqdeT/Mu0ePApEsui2jCb1KpvvWitDXRiOObvH+VotMDL5ab /QYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717190826; x=1717795626; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TAUDxzrtqj/ICHE+ae4vzYlj58PmB4nUgngJLRxHF3Y=; b=adDRw7l4fsle7lI2iRBH7AwXYDkU4Xrw0ab3tFIyCiIOC6s1Fp+Ecl4iPUe67wGKy/ KX7qyfGBaCx5r2JYRon4ZFwjYYK6u4RTS7L3NdzAY/OIEBBPX6KvGuFodODBE4NECgL8 W6aK+sOlr9l8iNV7FSgTo2AqJDvuNLHFTZ/O2nnAz1HKtUdLbF86fKkvERJaoujplLl1 oky5X8SDnU2URjwMKkPPz8Q7V34mHTPG41edpiZLtjzfcpe4119Q/qW3Z3mYNxDRiOEj TuAPckiWJ2pd0G9Ma6IH//oV6q1gyadH5/nMuG7r3bP4jFCRqux7JxJVvYkAn37C9UKn uzAg== X-Forwarded-Encrypted: i=1; AJvYcCUVhPub8IQ0odhICXEYGBBNveEg5yOjDa7IC+bcckhAqTCA4Q4vpBWbJaxQIO03k0ZAUD9mv60RscSO5D19gpTUzPhgSRF7rQ== X-Gm-Message-State: AOJu0Yy6m12zRjJozp2nIaHieWYebneC+KCEN0w+P3a7a8ugueNfnsdL bGmRwcTAzhXvj3egnxIMSJ/LaI8Q5iUnsq5p5XcJGzf/PjhXlBmEb1+HBEb33fu3k+7uOLO2GhC Z9MKLikCiYvrfUFCU+ldgIS7e7ss= X-Google-Smtp-Source: AGHT+IG3pvk1MUI2ac30cfCD/26wyxR9dF0t/sSN0D4K99fBWyv+dx74fCcc8Zim2TBLIdLUqy/UxB/0DXviOkDk2/Q= X-Received: by 2002:a2e:6804:0:b0:2e9:81f2:ce03 with SMTP id 38308e7fff4ca-2ea950f70c0mr18334741fa.20.1717190826122; Fri, 31 May 2024 14:27:06 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <0a6a61cd-f203-4dea-a7f8-97e6b885c52d@app.fastmail.com> <734bb8e8-2fdf-4e50-9039-e53c99ee4930@app.fastmail.com> In-Reply-To: Date: Fri, 31 May 2024 23:26:53 +0200 Message-ID: Subject: Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2 To: Claude Pache Cc: Larry Garfield , php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: landers.robert@gmail.com (Robert Landers) On Fri, May 31, 2024 at 9:13=E2=80=AFPM Claude Pache wrote: > > > > Le 31 mai 2024 =C3=A0 18:08, Larry Garfield a = =C3=A9crit : > > However, this also brings up another interesting issue: readonly properti= es (in 8.3) DO allow redeclaration, essentially adjusting the property scop= e (the class that declares it) to make the visibility check pass. That is, = the definition of the class it is private to changes, which is different fr= om how inheritance works elsewhere. When the parent writes to the same pro= perty, a special check is needed to verify the two properties are related. = All that special casing effectively means that readonly in 8.4 wouldn't re= ally be "write once + private(set)", but "write once + private(set) - final= ", which is... just kinda screwy. That means our options are: > > * A BC break on readonly (not allowing it to be overridden) > * Make readonly an exception to the implicit final. > * Just don't allow readonly with aviz after all. > > > Another possible option is: > > * Make readonly be `protected(set)` by default. > > That would weaken the originally intended semantics of readonly, but in a= compatible and acceptable way? > > =E2=80=94Claude > > I know this doesn't really contribute to the conversation ... but if I could ever mash a +1 on a single email, this is the email I'd choose. "Best elegant solution that happens to delete readonly without deleting readonly" award. Robert Landers Software Engineer Utrecht NL