Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112635 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 21941 invoked from network); 29 Dec 2020 16:03:56 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Dec 2020 16:03:56 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 00E741804A7 for ; Tue, 29 Dec 2020 07:38:24 -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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 29 Dec 2020 07:38:24 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id DD27C5C0165 for ; Tue, 29 Dec 2020 10:38:22 -0500 (EST) Received: from imap26 ([10.202.2.76]) by compute4.internal (MEProxy); Tue, 29 Dec 2020 10:38:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=wq5IOF CYdh0Gaky5aMm30pL6BO6MgSXxO+oOIEOzgBs=; b=J8b2VoUGJMveqpYc3mFfu5 sIghTxAhQovtpdACDk6BPJMZC2mZNl4/pH3P3Q2gxXQUCKsxMlqoruEfNe6ifKd9 jdHNTpLO5fMSEZIfw+E3UWJhbsc4HTEHpGXLTdQ4TWSS0aphgACjAjtS4UzEU4aw 3/uivakAu2LanuZHi3F/YYuPaFHTD+3qD3cYp+xMKlI9j14KeH+5hgMeUbjjcZwx CECKpDUsn5Sbc90w+cU+x6yexi0h/kVhmdVEMxX7aVxAuQCA/uLBB2TpjD/lG1nR 4+DuwDnSYYsBI3C4r0YqM35H39XuRsKxttfd9Ip73nOW1WVR8W1ehBY4RkxGsNsA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvuddgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreerjeenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpeeuleeitefhhfetvdeihefffffgudejiefhgedvjeff tdehkefhkeffgffhheekgeenucffohhmrghinhepphgvrghkugdrtghomhdpvgigthgvrh hnrghlshdrihhonecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 5A1EB14200A2; Tue, 29 Dec 2020 10:38:22 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-ID: In-Reply-To: <03108284-740a-4a5d-130f-15b2e67e9df9@mabe.berlin> References: <1d0abb04-4987-43a9-85bc-bccc3bd6be9a@www.fastmail.com> <03108284-740a-4a5d-130f-15b2e67e9df9@mabe.berlin> Date: Tue, 29 Dec 2020 09:38:01 -0600 To: "php internals" Content-Type: text/plain Subject: =?UTF-8?Q?Re:_[PHP-DEV]_Analysis_of_property_visibility,_immutability,_a?= =?UTF-8?Q?nd_cloning_proposals?= From: larry@garfieldtech.com ("Larry Garfield") On Tue, Dec 29, 2020, at 2:26 AM, Marc wrote: > > On 28.12.20 21:23, Larry Garfield wrote: > > There's been a number of discussions of late around property visibility and how to make objects more immutable. Since it seems to have been well-received in the past, I decided to do a complete analysis and context of the various things that have been floated about recently. > > > > The full writeup is here: > > > > https://peakd.com/hive-168588/@crell/object-properties-and-immutability > > > > I hope it proves stimulating, at least of discussion and not naps. > > > > Thanks for the nice write up Larry! > > Is there a reason you didn't mention the proposal for immutable classes? > (probably because it never went into a final RFC) > > https://externals.io/message/94913#94913 > > https://externals.io/message/79180#79180 Two main reasons: 1) It's not been discussed recently (see how old the dates are on those messages), so I wasn't thinking about it. 2) An immutable class would in all practicality be the same as a class where all the properties are initonly (or writeonce, but that was already rejected). So any arguments for/against initonly apply in aggregate to an immutable class. --Larry Garfield