Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118998 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 82144 invoked from network); 13 Nov 2022 22:09:04 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Nov 2022 22:09:04 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7094018004D for ; Sun, 13 Nov 2022 14:09:03 -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.2 required=5.0 tests=BAYES_40,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: Received: from mail-ua1-f53.google.com (mail-ua1-f53.google.com [209.85.222.53]) (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 ; Sun, 13 Nov 2022 14:09:02 -0800 (PST) Received: by mail-ua1-f53.google.com with SMTP id v8so3122344uap.12 for ; Sun, 13 Nov 2022 14:09:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=SuF8Mgy5v83MBt6p36YrRbODM009tg9S05vQafe1QPA=; b=I1mfNFzuiz3d8oWKVgj9XgGnznKKmbRmWBKX63TSfUeBhbWS09A7NMLFnC6mLUCJFZ wLSuRWcopNkaTOHyet52Swb9oQxi9aIbJHDhv8cO1I+nLfQmNUJzZ91rUImoESrOGwma 4WpKVgbhBIR0TXoxO7Fb6csVNCOe5kblicUT83SD3DZDARAtedvb4hajfiGrWGPszziG GiN1Oy6LgdfjTiRqHTlm3N5PoUUvzUK+Tos7MLVMO83Gf3Hd0TQ7wecxAkH8L2DNFbim 4XO25pmEpZ/5RFcs58U6tit9oxQ4ngG7wSN8f9f20FZvz0KH3cAFGcioOaHF44PosPqp 9opw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=SuF8Mgy5v83MBt6p36YrRbODM009tg9S05vQafe1QPA=; b=lej04SOT+l3PjovbRylo+EQ9PbFeJhXsvxWoPap0fDp+LOnuOdW5bSfk3bZMUPFZkw sseJ95Nd7JkzcyCr3+OpgsEXDKZbcJE0E0xiR7r5+2iFvwi4pjwZCUoJ/yvN2ihMhGli YDD04raY5xHyFNVJsqM4XPn6Kv0vhUx9qegAELLSKWmOjnSuT2400hJKfYCRaNQKPlCU JyOwhPoXxB7+9k8aS1qHSo7z8LVkvbKQ71ISoN8ehDFdRgVCZCoGr8tphnIAU3g08KPN HG7a7zpqz4anE7piXl9CMAtuGwglXJU0OTTbNmqrGP/MDKsO5szbp56afWP1To6wcrIw +EuQ== X-Gm-Message-State: ANoB5plvKSiD3C8vJ7n6ROZmBXJZbMECyXxRcGRCENy0sAY5BWmmynwm A9t2O4hRjwJrnmta7TpNLGkQH3o4scneEgYAKP0= X-Google-Smtp-Source: AA0mqf5CUKeJqXOivDk5gSd9l8XjluUk01ci7JkM1cD/3jTgZJtwysVHMyv4uRkq3zuRX7SF3tfDUqtI0bgNyfK8FIY= X-Received: by 2002:ab0:4ac7:0:b0:411:968:212 with SMTP id t7-20020ab04ac7000000b0041109680212mr5368036uae.107.1668377342109; Sun, 13 Nov 2022 14:09:02 -0800 (PST) MIME-Version: 1.0 References: <0854b030-c51c-4c1b-a7dd-22835a1e5da9@app.fastmail.com> In-Reply-To: Date: Sun, 13 Nov 2022 19:08:25 -0300 Message-ID: To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="000000000000d3f08605ed615e52" Subject: Re: [PHP-DEV] [RFC] Asymmetric Visibility, with readonly From: deleugyn@gmail.com (Deleu) --000000000000d3f08605ed615e52 Content-Type: text/plain; charset="UTF-8" > > > This is untrue. You can declare a private property identically in a > parent and child class, even readonly. I'm doing this now in a project. > It works, but would be unnecessary if the parent's property were > protected(set). > > --Larry Garfield > I do understand the slight complexity here (perhaps stronger in terms of implementation), but my assumption was that if a property is private and "the set visibility must be tighter", PHP would never assume `private protected(set) readonly`. In other words, if `private readonly` then `private private(set) readonly`, therefore nothing changes. You can keep the use of disjointed variables in inheritance provided they're all private. The only concern is when a property is declared protected, which then evaluates to what I mentioned on the previous email. I'm also under the stated assumption that `public public(set) readonly` is not something needed to be supported. -- Marco Deleu --000000000000d3f08605ed615e52--