Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119065 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 55041 invoked from network); 30 Nov 2022 19:35:26 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Nov 2022 19:35:26 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C73881804F8 for ; Wed, 30 Nov 2022 11:35:25 -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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS29838 64.147.123.0/24 X-Spam-Virus: No X-Envelope-From: Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (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 ; Wed, 30 Nov 2022 11:35:25 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id EFDB5320099A for ; Wed, 30 Nov 2022 14:35:22 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute4.internal (MEProxy); Wed, 30 Nov 2022 14:35:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1669836922; x= 1669923322; bh=JH65407Ot7EvpW98veJcxmwR9B1EnaS/4bW7y/wlbds=; b=F aYmJoucuGNfdYTJqcrtJxd2CDrScvQ3oVZ62jh5wn+ApEtTz7ut2OUPQXVBk3QB9 FS/Kb72iiZQFYyy+TbcYPnindawzQvSNp/JRJ+caMoZfKb7IOTPKiS02AECyUbmF Z313Zz0EWaOSKnH9VNQuXUuYPOaCwKfzS7D8LOcCfwiYZgZBvjddXAsR5Mx5Qm0S CPMCp16Z39QeEaHJqDnr2vqADnHsgFGxItz0sJJtipmD+aF6QECJsZzpcajig/nA hp2dMLwZBHcjKRhSmmluLFBS3e+vdge+XHaqCrmgOtV/GQ7xZfAAFrT6IkeNFZvi 7T9ENx050FGhftsmLbxng== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1669836922; x=1669923322; bh=JH65407Ot7EvpW98veJcxmwR9B1E naS/4bW7y/wlbds=; b=hEZ1QXCGqrp6uc2fa3lFHjcWWSdGHKTP2rSSgFHbCJy0 zaFUxNgqR3m8jmb7kucGWTRC995mLKqm6o6o+fhTRP12mpgMGptdO34Gy36ya7// GMOH65gj5PhxK1pVIvLjqxYckHi4kyOkiR49ltsFZAXHOc5XM6ge1xCHKtYxFxGV wMuEiXgSGHfwijiA6yY65b8DHOUPgt9L9bd74LdWtKKUMp++8QbXRnMrsSIdzVCL 23yXv2xvaW628uxnQdp5twTCHGYUc1QxXs0PLGe2Rj4UWnERD2+S96h6GfoUjcJN ckVd2yjKR07SXhpPfE3ZnF+C/fGvuLPwBpgUVnfRpw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrtdefgdduvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpeeglefgkeduiedvvdetffeujefftdfhjeeiveehgfff keduveektddvledvvdfffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 410511700089; Wed, 30 Nov 2022 14:35:22 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1115-g8b801eadce-fm-20221102.001-g8b801ead Mime-Version: 1.0 Message-ID: In-Reply-To: References: Date: Wed, 30 Nov 2022 13:35:01 -0600 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] [RFC] [Discussion] Readonly class amendments From: larry@garfieldtech.com ("Larry Garfield") On Wed, Nov 30, 2022, at 9:46 AM, Deleu wrote: > After reading GPB, Nicolas, Jordan and Larry's considerations, I no longer > have any objections to this RFC. Here is my summary of it all: > > - It's very easy for everyone to wrongly interpret readonly as somewhat > immutable, but it isn't (docs/education issue) > - LSP is about the writer of the child class, not about PHP > - If you don't want child classes to violate LSP, make your class `final > readonly` > - readonly as "constructor-init" properties mindset make it even stronger > the argument that child classes should be free to choose their definition > because constructors are special methods not bound by inheritance. Just for the record, my whole point is that "readonly as constructor-init" is wrong, and I am angry at the SA tools that have invented that out of whole cloth because it just breaks workflows that I am using very effectively and safely. I always turn off that check in those because they are wrong. That is *not* how the language feature is implemented, so making other language feature decisions based on that incorrect, artificial "rule" is highly dangerous. --Larry Garfield