Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114732 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 10221 invoked from network); 4 Jun 2021 18:30:14 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Jun 2021 18:30:14 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5F6321804C9 for ; Fri, 4 Jun 2021 11:44:00 -0700 (PDT) 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 autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com [209.85.217.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 4 Jun 2021 11:43:59 -0700 (PDT) Received: by mail-vs1-f54.google.com with SMTP id j15so5361299vsf.2 for ; Fri, 04 Jun 2021 11:43:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Vaf/0hLPyhHQ+9dBukJOBy4hsnjKbrPaXzTiHz3MjZw=; b=BGUGfpjK+4VhM1M+qrZLxd5dHHs1SD5aTVrdqhTzMpwOMu+85ajChzX4lN6/alrOpU NTPtDYJAHFI97Pd1Zeq9IHVFPxR6BqQu7morF/Uz4f+wLt1dfkQfQ1AtMhuxQxhdhRh3 abxYCgUXD2uLmi9GFbbC1Rf+Ej4yZLCRYyUgkfuVfOqLavZBYSmEziacAAu3YsbHbdoD cS4/1Y3pRlN780In0yfyl9bMZDrtynQXsJvKVoSCECluxjBCPmK3ZT2+0kMe6Sc9UcWc xPurmbYzPDxYVY8Cve77ARB/hJhLvlBHMiY0dA9dZRwQzjjMNXPH5FXMwXmnqlzffdoT 2ytw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Vaf/0hLPyhHQ+9dBukJOBy4hsnjKbrPaXzTiHz3MjZw=; b=qvtw/LuJguB2RkxxsrX0gsyXZZR6pmFsO5lgvq1H2F+VrcgA72BFiMqdLUGl6WqhBu +tfh4g7NWIj0aMCPMaRajpvkjyp37kgesqKuG3wcu/ONPhz6rcs7OLnugByM0Ox7ws5t aKnZXyDECdCURcuPnLd/ttYSvhdnIU5FVyFbZ7rJH5T8csJ0euWB9Ufp79czCvTMI/Az CSB1jRZLRu08I7Tx2z0OrU7K4aEYTakS9scvECsraqjYK3iBqgh0rkmWA0EWnRsMUfNn aLSS8gTrQrDegeTxqXc1ft9Ni5ss66ZvJy6PQ3tMpYWHWWtm/QOCVu0dYA6+rCGCrP6y yZ/A== X-Gm-Message-State: AOAM532avw2UD/cuoD6iFkcUN6+y8vnpyO99Wsrc5GIQ2EVotntkOBAZ 88L5NgFqMQGZXXA/0CO/n/1woLk0Lyqti+kQUak= X-Google-Smtp-Source: ABdhPJzRk3A4CpxMFcKbU9xJyMDzlkMk1PxYVvkfoQTv9EKAnKaex1b0olqvXTbowt06Sn2qqNxVyxK1TdmLD7nI2zo= X-Received: by 2002:a05:6102:99:: with SMTP id t25mr2223520vsp.48.1622832235905; Fri, 04 Jun 2021 11:43:55 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 4 Jun 2021 14:43:44 -0400 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000f3879b05c3f51293" Subject: Re: [PHP-DEV] [RFC] Readonly properties From: matthewmatthew@gmail.com (Matthew Brown) --000000000000f3879b05c3f51293 Content-Type: text/plain; charset="UTF-8" This is a great idea! Might be worth mentioning that Psalm already supports a `@readonly` docblock annotation (first suggested by Nuno Maduro), and it matches the proposed behaviour (though Psalm doesn't currently prevent inheritance issues): Example: https://psalm.dev/r/7ed5872738 On Fri, 4 Jun 2021 at 11:19, Nikita Popov wrote: > Hi internals, > > I'd like to open the discussion on readonly properties: > https://wiki.php.net/rfc/readonly_properties_v2 > > This proposal is similar to the > https://wiki.php.net/rfc/write_once_properties RFC that has been declined > previously. One significant difference is that the new RFC limits the scope > of initializing assignments. I think a key mistake of the previous RFC was > the confusing "write-once" framing, which is both technically correct and > quite irrelevant. > > Please see the rationale section ( > https://wiki.php.net/rfc/readonly_properties_v2#rationale) for how this > proposal relates to other RFCs and alternatives. > > Regards, > Nikita > --000000000000f3879b05c3f51293--