Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121757 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 53817 invoked from network); 22 Nov 2023 14:12:24 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Nov 2023 14:12:24 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7988A18003F for ; Wed, 22 Nov 2023 06:12:27 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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 ; Wed, 22 Nov 2023 06:12:27 -0800 (PST) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-32d9d8284abso4529962f8f.3 for ; Wed, 22 Nov 2023 06:12:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700662342; x=1701267142; 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=7igtLhxy+zp8sBo32Xawr/uVlIaSK1GY8nPmujivKjY=; b=USF18qIl/7/Q0293Urs3+7XLIn0zApLFAHcBxDSA2RgssNULJMxDTpFF/qSyj2IkOt e6nlWB5O1NAtSXwY/oDGEwu57J/KO/3dbZmMy0uez2+jVKYpEu1GBeYju08u7P4nHVoG 6sggUp13rtkbao23T9YYO4+OxltKQBhZLFqP1gIQmSx4DVx38e9nAFyIXO+IaVevvZBT kW3+CDbqr1mKbzx8QqLuYvclTR1kRiROiRh3LQI8VOcY9ZsUz/w2PYbg9F2iHAHQntL0 DAVnLVB/4l9REQNnybWXg/VuDhcgw3K9de7wqNeiQT+nXvoo9p47GgGZKmN+aaoeXFH5 aC3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700662342; x=1701267142; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7igtLhxy+zp8sBo32Xawr/uVlIaSK1GY8nPmujivKjY=; b=RKkllhGUBg3gDpUd6pNtapuzcVL9mfZFYeZcx8lYg3zUz6oI6OKaXE72uCHGZeA9AV TvQm9B4uKtBS0KZ4Z9FZkH+4Qeots78KNN54EVxovR3YAocWD2zOJyaXhQIcilPe9uz1 DU94ueSb5ldUrCjmDEslVBHdneFKIpjY5ebZKmnD0DKKGZNsF4CN1NzwcxJn3wwgq7l0 tDz5YdUIBJSWXcRxohGNz47S2YPY6+FhuMRv8n0TlbbVT0x4fbJt7ePdRc9oyaih+aiT tcmT2xyqLClToHHdBB+c9BqEoDICRu98uqFNR28olOqk10OYu64cOsf7+3pFvyRTwmkj Z5Xg== X-Gm-Message-State: AOJu0Yw5/zJ+YhnBreprxtLdkDOB5RFZxjGP4Gf275XjJjiDt3EGyBPZ PM0E/e4cS+Z2JYS+9fWUfSWR0rId0bv+pC/slfw= X-Google-Smtp-Source: AGHT+IHeSLhJfr5aIINr5uwsOxOWVJkxI80pdjjZQsaIxB+ZwRo6HPgN0RtoEVs3A/U07VJqizsEFkovWiXWnWTpwfU= X-Received: by 2002:a5d:4006:0:b0:31f:fa66:5852 with SMTP id n6-20020a5d4006000000b0031ffa665852mr1271739wrp.21.1700662341434; Wed, 22 Nov 2023 06:12:21 -0800 (PST) MIME-Version: 1.0 References: <2b4591c1-f999-49b5-8061-67db816aa0da@gmail.com> <054a1e3e-f860-4596-83a9-9f557c6fd316@gmail.com> <4c5c9209-e797-49f3-84a8-f8c2371b34d1@app.fastmail.com> In-Reply-To: <4c5c9209-e797-49f3-84a8-f8c2371b34d1@app.fastmail.com> Date: Wed, 22 Nov 2023 15:12:09 +0100 Message-ID: To: Larry Garfield , Rowan Collins Cc: php internals Content-Type: multipart/alternative; boundary="000000000000be838d060abe4e13" Subject: Re: [PHP-DEV] Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000be838d060abe4e13 Content-Type: text/plain; charset="UTF-8" Hi Rowan, Larry, Thanks for the RFC. I think there is an inaccuracy that needs to be fixed in the after-unset state : as noted later in the RFC, magic accessors are called after an unset($this->typedProps). This means the state cannot be described as identical ("uninitialized') before and after unset() in the first table in the RFC. Isn't there some vocabulary in the source that we can use to describe those states more accurately? My initial gut reaction is that both ReflectionParameter and > ReflectionProperty should treat "omitted" as "mixed", and just evaluate > their type to "mixed". It is in practice a distinction without meaning, or > will be after this RFC. That said, I also have an itch telling me that > there are a few small-but-important edge cases where you would care about > the difference between mixed and none in reflection, and that I'd be the > one to run into them, but I cannot think of what they would be. > I think this needs to be clarified. I can't think of when this difference could matter. I never wrote any code that could give any meaning to mixed vs untyped properties, and many here know that I can write unusual PHP code. I actually always wondered why we have this difference and I therefore welcome the RFC. Maybe this can be evaluated up to the point where we realize that the change could go into 8.4? I'd be happy to run a patched PHP on some codebases I maintain to see how it goes. Nicolas --000000000000be838d060abe4e13--