Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119416 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 51460 invoked from network); 24 Jan 2023 12:45:32 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Jan 2023 12:45:32 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EE82C180088 for ; Tue, 24 Jan 2023 04:45:30 -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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15623 212.45.192.0/19 X-Spam-Virus: No X-Envelope-From: Received: from mail.gna.ch (mail.gna.ch [212.45.196.109]) (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 ; Tue, 24 Jan 2023 04:45:30 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by darkcity.gna.ch (Postfix) with ESMTP id 8FB103A1D80 for ; Tue, 24 Jan 2023 13:45:28 +0100 (CET) X-Virus-Scanned: amavisd-new at example.com Received: from mail.gna.ch ([127.0.0.1]) by localhost (darkcity.gna.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MD0Fc-7gcxoE for ; Tue, 24 Jan 2023 13:45:27 +0100 (CET) Received: from smtpclient.apple (unknown [IPv6:2a02:1210:2ea4:cf00:a4f6:3559:c909:179e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTPSA id CA6BC3A0CDE for ; Tue, 24 Jan 2023 13:45:27 +0100 (CET) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Date: Tue, 24 Jan 2023 13:45:27 +0100 References: To: PHP Internals List In-Reply-To: Message-ID: <4534922E-AAB5-4B2B-A9EF-73A369545012@cschneid.com> X-Mailer: Apple Mail (2.3731.400.51.1.1) Subject: Re: [PHP-DEV] [RFC] [Vote] Readonly amendments From: cschneid@cschneid.com (Christian Schneider) Am 24.01.2023 um 09:55 schrieb M=C3=A1t=C3=A9 Kocsis = : > We've just opened the vote for the "Readonly amendments" RFC, which is > going to be open for 2 weeks (until 2023-02-07). >=20 > Link: https://wiki.php.net/rfc/readonly_amendments > Discussion: https://externals.io/message/119007 I like the idea of more power to developers (even if they can shoot = themselves in the foot), so I'm supporting this RFC. While reading the example "Here is an example of a non-readonly child = class that tracks the number of times a method has been called ... Such = constructs are commonly used in e.g. mock classes ..." I was wondering = why the same argument isn't applicable to most classes recently proposed = as 'final', e.g. Text or Dequeue. I know that there is the school of thought that "inheritance is bad" = which discourages extending existing classes but I'm still not fully = convinced something like benchmarking, logging or mocking are not valid = applications of inheritance. Discouraging inheritance is one thing, = disallowing another. Maybe this needs to go to a separate thread but this RFC made me aware = of this issue (and the different views people have about where PHP = should go) again. Regards, - Chris