Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121765 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 86261 invoked from network); 22 Nov 2023 22:17:24 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Nov 2023 22:17:24 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 88F3918002B for ; Wed, 22 Nov 2023 14:17:26 -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=-1.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, 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-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 14:17:26 -0800 (PST) Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-332ca7f95e1so158675f8f.0 for ; Wed, 22 Nov 2023 14:17:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700691439; x=1701296239; darn=lists.php.net; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=K+0/6fDsjT7lsuJhA8UpeeTOZDp7yC/iNYY/+CNxp3I=; b=grWkVtZFY7JE6GgALCYlWPwEJnZxKEjQ9lQdxvEbK0TNnv7FKPDaMZ1da7iucXkBe5 nFzPV3nqSSFmIaSB4dLfCoI2dPvfCwaJXYg5Doc1hH6dNqrG7ppi/8NaVly2mv/PYZq1 K6FpQDD98hYIYJw2MUFONxzUQOcDlX8XMJvuktFwE4GaBCwfZX5VvcxeoQasppMxb80q s+M14o3pfuqYimOwNkGc+zlbxamxDVmQ8xQUnC4cFOUCH/bj3zj8HsUeuArOaEG4CGOt a0K9BG/s3upvl9AC3lNAqrlbRrRTBkXoL0CNlo3vEW1J6r0k56RUc5u3xt29RnEhqirO kcNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700691439; x=1701296239; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:to:from:date:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=K+0/6fDsjT7lsuJhA8UpeeTOZDp7yC/iNYY/+CNxp3I=; b=QunNDpYWC/RLATp/X8ly7a6RUtIXuHwqxr4OH1EAs5gXEChQdDSffNrhNEaqx0dpUs lo5JLSNWDWBXbIyHrSct+Oiw5+Bf3tg4dmMDWQHP+dK3+Yaqx/VMaLQZrOmHi/PPHcAa v24TQ6XUFuK1phmxXRmvACoemEPQpZYJ7hiJxyLbmEonda/1FSVUbBek6PByGHmRuLT8 oXvmvyaOGkZnwlYwi1liYVOINnD5baGdHzv+cw3qkfIM6bQFA7fyIHfQB8H7pfsFyGcl +3dMARsXlbjwo/Q3pYNTZdhrsj5L+r9v2ccz73BfaWWH91u03JVa/6aBA8RZvW0Ms+mW Y8wg== X-Gm-Message-State: AOJu0Yxf+STj0ECM0Ghz06CR33i2ljn/7kFBIJpvarae/kTMAIvmZHqn LeE0e0OKRy08sLNHOX8vbGEn+sD8g5Y= X-Google-Smtp-Source: AGHT+IGA8YRgnPGoxVqZnaCJu8aK5B34OSLxOC/Dk4kUs4wMs93XAL9pUTHOEMm8itsqMKSU/ThkaA== X-Received: by 2002:a5d:610e:0:b0:332:ca0b:578e with SMTP id v14-20020a5d610e000000b00332ca0b578emr2463715wrt.27.1700691439507; Wed, 22 Nov 2023 14:17:19 -0800 (PST) Received: from [127.0.0.1] (cpc83311-brig21-2-0-cust191.3-3.cable.virginm.net. [86.20.40.192]) by smtp.gmail.com with ESMTPSA id o15-20020a5d58cf000000b0032d9337e7d1sm456964wrf.11.2023.11.22.14.17.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Nov 2023 14:17:18 -0800 (PST) Date: Wed, 22 Nov 2023 22:17:14 +0000 To: PHP Internals User-Agent: K-9 Mail for Android In-Reply-To: References: <2b4591c1-f999-49b5-8061-67db816aa0da@gmail.com> <054a1e3e-f860-4596-83a9-9f557c6fd316@gmail.com> <4c5c9209-e797-49f3-84a8-f8c2371b34d1@app.fastmail.com> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: =?US-ASCII?Q?Re=3A_=5BPHP-DEV=5D_Re=3A_=5BRFC=5D=5BDiscussion=5D_Har?= =?US-ASCII?Q?monise_=22untyped=22_and_=22typed=22_properties?= From: rowan.collins@gmail.com (Rowan Tommins) On 22 November 2023 14:12:09 GMT, Nicolas Grekas wrote: >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)=2E This means the state cannot be described as >identical ("uninitialized') before and after unset() in the first table i= n >the RFC=2E Isn't there some vocabulary in the source that we can use to >describe those states more accurately? Oh=2E Wow=2E That's more than just inaccurate terminology=2E=2E=2E I always assumed the rule was "access to uninitialised properties triggers= __get", not that there was yet another magical state buried in the impleme= ntation=2E From a user point of view, I find that frankly terrible: > Typed properties start off as uninitialized, but if you use unset(), you= can make them *super-uninitialized*=2E > > There's no way to actually see if something's uninitialized or super-uni= nitialized; and once you've assigned a value, you can't go back to the orig= inal uninitialized, only to super-uninitialized=2E > > Accessing an uninitialized property always throws an error, whereas acce= ssing a super-uninitialized property will first check for __get=2E I'm not sure choosing a different name from "super-uninitialized" makes mu= ch difference to how that reads=2E I'm probably going to regret asking this, but is there some reason it work= s that way? Is there any chance of changing it to just: > Typed properties start off as uninitialized=2E > > Once you've assigned a value, you can't go back to the original uninitia= lized state using unset() > > Accessing an uninitialized property will first check for __get, and thro= w an error if that isn't defined=2E Regards, --=20 Rowan Tommins [IMSoP]