Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109036 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 69763 invoked from network); 15 Mar 2020 20:21:40 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Mar 2020 20:21:40 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id BE6C21804DD for ; Sun, 15 Mar 2020 11:43:53 -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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS11403 64.147.123.0/24 X-Spam-Virus: No X-Envelope-From: Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (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 ; Sun, 15 Mar 2020 11:43:53 -0700 (PDT) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id B1CA75ED for ; Sun, 15 Mar 2020 14:43:51 -0400 (EDT) Received: from imap26 ([10.202.2.76]) by compute7.internal (MEProxy); Sun, 15 Mar 2020 14:43:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding: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=fm2; bh=Q3SqJ4a2A/EKnSau3NLouvbXAlIe+ETtAfeE0nmkC w0=; b=gcWlB8WZiCNABrUIjEWWdaYxuiwdUzGaHNYE6nCW+Lao1QlCiQEF/Q1ua chiPKBqrrYusTC/fdbiUaRRTiSDpzuKAjvvAdAgPrqTukXzXFx2EgPwaHalzYJyb 72lK3agS4Yd1FhbWwPAXSS5dy5X7jZBiD7KR/1TVUV7Vk5y0y6EkgfpSrBRx64Xm fy7rOg3GbPBW1vcZpp/8wpOnq/osxhRo20Rzpl3WVBllH++Wd47TtDvgm2q2qJXm qhiseA5oWwelMCyx96tQn29K757RgFdlM1PyvNwupwR9owaDYlxlMtLnQZK9U53k KFEhD1QS5atXI9koQILkGiP3gxoMg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudefuddgvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhep lhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id D780C14200A2; Sun, 15 Mar 2020 14:43:50 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-991-g5a577d3-fmstable-20200305v3 Mime-Version: 1.0 Message-ID: <6f2e7718-5d78-4c57-8da9-f8dd44cc9e7b@www.fastmail.com> In-Reply-To: References: <8545d15e-ddd5-42be-8405-09697a077234@www.fastmail.com> <4d9688fe-cc57-44af-903e-05f4cbb1bbcc@www.fastmail.com> <6bcbf0a5-92d8-4cfa-a00f-e0e967fc037e@www.fastmail.com> <700327df-45d5-47ca-8828-d7ad9c9bee2e@www.fastmail.com> Date: Sun, 15 Mar 2020 13:43:29 -0500 To: "php internals" Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] [DISCUSSION] Immutable/final/readonly properties From: larry@garfieldtech.com ("Larry Garfield") On Sun, Mar 15, 2020, at 8:48 AM, Marco Pivetta wrote: > Hey M=C3=A1t=C3=A9, >=20 > On Sun, Mar 15, 2020, 14:04 M=C3=A1t=C3=A9 Kocsis wrote: >=20 > > Hi Marco, > > > > Yes, it still allows default values. > > > > The reason why I'm reluctant to disallow them is that this restricti= on > > would feel a bit ad-hoc for me. I mean, I wouldn't like to add anoth= er > > special rule for "write-once" properties, unless there is a strong > > argument for it. Besides, as far as I know there is no precedents of= > > disallowing default values of similar properties in other languages,= > > so I feel that the feature would stay the most intuitive as it is no= w. > > >=20 > I think what will happen is that people will start requesting for read= -only > properties with default values to be over-writable-once (a mess): bett= er to > remove them from the equation completely, no? My concern is that if a readonly property can have a default value which= is not overwriteable, then it's conceptually isomorphic to a class cons= tant. That will lead to ample questions and debates about whether you s= hould use a class constant or a read-only property, or when you should u= se one or the other. I foresee numerous bikeshed debates about that, wh= ich will only lead to thousands of hours of lost time debating something= that shouldn't exist. Avoiding that confusion will save the industry millions of dollars. --Larry Garfield