Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130431 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id BF95F1A00BC for ; Tue, 24 Mar 2026 14:07:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1774361238; bh=JuYhyx+/fGvDzoY87Rmb68Lu9n4bTULKsa1oBvL8ejQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZHVqoLJzRHxUrwubUYEmErWVWkROuQy45/rmYEWsylc37bVL6RezW8vR0N0bMKuT1 dEhOHGXRdcPI3Q0Pa+nqX7XnzqjVCqCFbMSv6LWpyrLmvRYrq3XGFGhVmZaC4A1jAK 97DONhso/KkhfiYefEvZwHrPM7Qr7vk0PaW7g6dvt9ye0/qinrJRGlNntNbEwRKIBQ RhRmXpX+NtudsHRA/JuXelx5b5HoNiWcI3JbeqL2Am/ij77YHLjz+/xjMgQEeKbqEi /7rU55zW4JqPxcHUlw8OXikwJYh0rUp33GBoyyLqXWVMn7t3aLgDJIH9uxki9NEOZv 8gRWyGFp/+pYQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1A4D018006E for ; Tue, 24 Mar 2026 14:07:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: ** X-Spam-Status: No, score=2.6 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FORGED_GMAIL_RCVD,FREEMAIL_FROM,FREEMAIL_REPLY,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-vk1-f177.google.com (mail-vk1-f177.google.com [209.85.221.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 24 Mar 2026 14:07:10 +0000 (UTC) Received: by mail-vk1-f177.google.com with SMTP id 71dfb90a1353d-56ccdd0044dso3572261e0c.0 for ; Tue, 24 Mar 2026 07:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774361225; cv=none; d=google.com; s=arc-20240605; b=Z50tMc8z9VnW9lZNaI0ZpyqGHJcvYX1bOuBKyEv6LALse3qju8r2ESUe3uZOTC1h6T 3lgdf8xbFVbr5lo1gyDgV3rVZVLobd/taPJnaP/cQ59UBVDklA6QN+FXFlKERYC0J198 A+OTvvyjp7LEyxiB3vubr3p5HfkwLfhCV6k9gzJdYapg6IGnFqYKWmjleirsr/0950L/ qQk1L7AzoZ+x9PM1jVp8qihoSQ3Mow4TDqOqZ+nRIvcUXnZvKAyvG0eJ9a17FLrgVRJ+ JSnO1DFmIQUaqHUuhss5x0SFEs45qzsrZNvvTFCiBGIanSHDi281eJ7OWQ6b5W76sW8A z1zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=JuYhyx+/fGvDzoY87Rmb68Lu9n4bTULKsa1oBvL8ejQ=; fh=VQmQyVSYgJTLmNMMKarWLA2RYo7EsF0sgRqB7tIRmsw=; b=SkpHmrIJ3lCH0L1RfsKnBSEFPVHz9gpXceR3OuMJMcxlBZ64gIG0lOdmAQoq0FLjFE vKY7C0/o2+vJhG2r3OCTg+Ux5AezEravb5q3haD0fFL4hNL3bUqJjlhKncY8oaH5fRNd qu13YbCxqNY/bgoQ1g8xYj8rq7JszBMc+Wb4ed5HSAADWrS/97lpGbUhx/Okl3h+KXTd xXrqSF25V5ObWbWzkPZ3KlLHDZzO+Id6niEyYNpsB6nGOyrEqPSih6NF7t5+Sm9DAlOd MhF3oxwhoBd6K3iprrKeWR7tpWKiUNefDH5JUDIkUhQrwYQuZ1TE0w0EwfoKy3hLefIw rz2A==; darn=lists.php.net ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774361225; x=1774966025; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JuYhyx+/fGvDzoY87Rmb68Lu9n4bTULKsa1oBvL8ejQ=; b=R5K/mO2SHcAWsKvD3T9DzTk/1ESM890S37tv5b+eA7ghXMgw3J/rKAxMyl9YQZizZI bB2RHdYLv/bmnov27S6a7cVvDQ/dJ9O6CZt43yLHMX/zx/ut5+cnn1bDWC8n7wRadbAi tjmZs6vHCSPTIznaKdfDbh8yhSOfmvffvsQyudH3NszV7qmQunx+fXW/kiBaUIyOHfvY pCQJFTS9fKqGZO3BaW8dw983YQZ4AIg+MP2tFv0soJ/IdFbwLEXvCYKxF5miX/aQnse9 LcQvgYCUHQceFVAlIh9PVHGGHLAhYl2cC5VvhyvkVsyXIoRRcGZjAvhUHfrHWZWMhOBg iKGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774361225; x=1774966025; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JuYhyx+/fGvDzoY87Rmb68Lu9n4bTULKsa1oBvL8ejQ=; b=bugz1wQFscT3tbbjY9uB949UcMj46kPYrj2SkwZtOtA6dqSM8h6RoUk+BQx2CBWbrP kVMiLHsN+31/WFrWhIn3WLu+ka0XIWkrrJzxDH8Wtt6JjN3xrhs0rxoPhT/FNarlb0a4 gBKoRxzOfc/iEjs0tWpOkNbcW5yKQm6CDa994FFbToAbTEWbgUTNdzFRwFiTNTU/X81U WoE/cjsWq2QNwJe2RFCtors5UkmcMOaXNhGWa2f+otM5LjWEwKJ4RbYOVAPWnFpmRDpz P4YoyoBdPjk8+1wl8aVLgWMymUxApghlk7nJB2aVQNHhILyYYlt/uBe/6pudyxqT50z0 8pew== X-Gm-Message-State: AOJu0YwAjYXStU1woBl9S3uNm4tfw7uEpp5d499pU3Lp62zxxZCEe/LE ZMbK2BnFe8nQHFnMccplv3gqurpPoN7ZZuBQuPyyGqFaXdcbIwJ1le1MRjnsp0bGBeVkt9Xo0MH jgveH9LF5mtzb5msCjylqAfmuLhgz/tQ= X-Gm-Gg: ATEYQzy43KanYD5Tmv/n2W16e/0dVOZDbRaIfxoBrcAO2SmVSzNcbF3UUJhDx+ekq12 yNR6+xN0BJZHguS2L0jpzOFVi7n0SeKiwW6QvuX4SRwAxqnNiUQsM/3IcnHxznYwmQXt/Cvq+9A 3isTe+fQF6dJNndu7qGL3PIkZylKiu3Rad7yf1P3OVxYwX0E5rizkOHnumk4swNvIDxG4IMCjhg aPtScGvAARXRgdMDEIZnqoPNYeZjW62b8RGrFYqxhLR2gw1ZQvP/khyaDnrz+U42Ru+DONvCYzg UC9cuQd8yg== X-Received: by 2002:ac5:c986:0:b0:56b:942f:b870 with SMTP id 71dfb90a1353d-56d135d968cmr1273709e0c.0.1774361224889; Tue, 24 Mar 2026 07:07:04 -0700 (PDT) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 24 Mar 2026 15:06:53 +0100 X-Gm-Features: AQROBzBaeIalRljTDSbKautGJ598Lst5oisyTzUZc0kmjqgDTeLkDDcJ8P-_nh4 Message-ID: Subject: Re: [PHP-DEV] [VOTE] Allow Reassignment of Promoted Readonly Properties in Constructor To: Nicolas Grekas Cc: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000834a19064dc5aa3f" From: michal.brzuchalski@gmail.com (=?UTF-8?Q?Micha=C5=82_Marcin_Brzuchalski?=) --000000000000834a19064dc5aa3f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, I also voted =E2=80=9Cno=E2=80=9D, for essentially the same reason as Ilija= . To me, this is the wrong use case for readonly. If a property is expected to change during construction, then initializing it as readonly and later reassigning it feels like it weakens the semantics instead of clarifying them. One of the main values of readonly is that it communicates a very simple rule: once initialized, the property does not change. Introducing exceptions around constructor promotion makes that model harder to reason about, while the language already has alternatives for cases where controlled local mutability is needed. So while I understand the motivation behind the RFC, I think this moves readonly further toward special-case behavior, when it would be better to keep it strict and predictable. Kind regards, -- Micha=C5=82 Marcin Brzuchalski pon., 23 mar 2026 o 16:40 Nicolas Grekas napisa=C5=82(a): > Dear internals, > > It's now time to open the vote for the following RFC: > https://wiki.php.net/rfc/promoted_readonly_constructor_reassign > > The vote will close on 2026-04-07 at 16:00 UTC. > > Cheers, > Nicolas > --000000000000834a19064dc5aa3f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I also voted =E2=80=9Cno=E2=80=9D, for essentia= lly the same reason as Ilija.

To me, this is the wrong use case for = readonly. If a property is expected to change during construction, then ini= tializing it as readonly and later reassigning it feels like it weakens the= semantics instead of clarifying them.

One of the main values of rea= donly is that it communicates a very simple rule: once initialized, the pro= perty does not change. Introducing exceptions around constructor promotion = makes that model harder to reason about, while the language already has alt= ernatives for cases where controlled local mutability is needed.

So = while I understand the motivation behind the RFC, I think this moves readon= ly further toward special-case behavior, when it would be better to keep it= strict and predictable.

Kind regards,
--
Micha=C5=82 Ma= rcin Brzuchalski

pon., 23 mar 2026 o 16:40= =C2=A0Nicolas Grekas <= nicolas.grekas+php@gmail.com> napisa=C5=82(a):
Dear internals,

It's now t= ime to open the vote for the following RFC:

The vote will close on 2026-04-07 at 16:00 UTC.

Cheers,
Nicolas
--000000000000834a19064dc5aa3f--