Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112647 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 58374 invoked from network); 29 Dec 2020 21:33:34 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Dec 2020 21:33:34 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 069851804A7 for ; Tue, 29 Dec 2020 13:08:05 -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.0 required=5.0 tests=BAYES_20,SPF_HELO_NONE, SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail.nunninger.info (mail.nunninger.info [87.106.55.207]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 29 Dec 2020 13:08:04 -0800 (PST) Received: from p5093df94.dip0.t-ipconnect.de ([80.147.223.148] helo=[192.168.178.45]) by mail.nunninger.info with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1kuMDk-0006Zf-Tk for internals@lists.php.net; Tue, 29 Dec 2020 21:08:01 +0000 To: php internals References: <1d0abb04-4987-43a9-85bc-bccc3bd6be9a@www.fastmail.com> Message-ID: <598efbe1-ee7f-8083-99df-4602df113850@nunninger.info> Date: Tue, 29 Dec 2020 22:07:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <1d0abb04-4987-43a9-85bc-bccc3bd6be9a@www.fastmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Analysis of property visibility, immutability, and cloning proposals From: thomas@nunninger.info (Thomas Nunninger) Am 28.12.20 um 21:23 schrieb Larry Garfield: > 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. A really nice writeup and interesting to read. But I have a question: > We then end up with the following combinations: > > * public read, private write > * public read, private read, init write > * public none, private write > * public none, private read > * public none, private read, init write What is the difference between (a) "public none, private read" and (b) "public none, private read, init" write"? When will (a) be initialized? And if there is really a useful case for (a) why is there no "public read, private read"? Regards Thomas