Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114619 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 88426 invoked from network); 26 May 2021 13:13:09 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 May 2021 13:13:09 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6E3951804E3 for ; Wed, 26 May 2021 06:24:41 -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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 26 May 2021 06:24:40 -0700 (PDT) Received: by mail-wr1-f47.google.com with SMTP id g17so903844wrs.13 for ; Wed, 26 May 2021 06:24:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=a9DmTYKQpjmD0X1LKfOO6zQ5Fy/+1/rQqdiLv/3LNZc=; b=oLU2M0mdfMs5NPCa/nwngUf1queyFU9ibF/UBlyhOpZB2o/XYCdt7OD1m3pvBODsP4 A7xBDeCZq8cWHGnZNic9QtikzvZa3ZNh64SDUMBMDtpzq7kIOe7nSKlekXipK4d4h2hb YAmIKGHEqyUxriuz6ZaZ5TV7EiaUtYktmXY7d3Updaf+yEFoxZ9y5mAtGVagoRDI+zxv KZPZ2x154+WfcZMrWxvZQWbcDFEkRnSXhpgze2IfRTgoI8gD2bSXDl/Vlhm+BcBNOHEc iJCzLaxbTRo3CBXN+G/EuRabaaWCZJmnHWVLchGJ8n5XHWNQZbMawuPAq7yg7FYTSg22 +N/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=a9DmTYKQpjmD0X1LKfOO6zQ5Fy/+1/rQqdiLv/3LNZc=; b=c+BEbI9HkaN6vOGqYOAiVGExuG2qt8yNOWXTi5kJYAceCAIMPae4G/2hkBPZqr8AXk PFhnUMaZWYVQph3HiOrpESOzVv3XHU72J8RFCCTuzxetcP54F5IbOsFSrJvBYWXFQNm8 AimUqZQR57W/dawGMkEg2FcSsC79cmVWkY0twdyFzJaIwl4OIEKjOjm8lMD3CHyMZQRj AGbPiuZU8qukM0Yew2buRi0ib3d07LvNE8XpC2hHle9SSecBTwvIk6T+lr1ERQg+Up7C gDfQKhJ7UdqDkoSrFndONzZCOzHeToU0JMKc5j2q3WN2K4z1KaaQ5AKaG6yNbtoFpx/B Le5g== X-Gm-Message-State: AOAM531Bx9LWNDQJar7LP9mEUTYKRX5i5KpcqOm+LIhRIiLE800caIRl aTxZ6xUXrG/KxJ4jcor/7W3dBIM3ZSw= X-Google-Smtp-Source: ABdhPJwqQRfYgNjQ4J76DJIr9JRGFEm7olQmsvJKnSy79jN5rbRShBVUWDNQI8j5gcsXV4fr28maiQ== X-Received: by 2002:a5d:608e:: with SMTP id w14mr17885201wrt.51.1622035479798; Wed, 26 May 2021 06:24:39 -0700 (PDT) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id s2sm5109844wmc.21.2021.05.26.06.24.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 May 2021 06:24:39 -0700 (PDT) To: internals@lists.php.net References: Message-ID: <80fb5a8e-d770-49fd-45d5-ea6f4b004513@gmail.com> Date: Wed, 26 May 2021 14:24:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [PHP-DEV] Consensus Gathering: is_initialized From: rowan.collins@gmail.com (Rowan Tommins) On 26/05/2021 11:13, Joe Watkins wrote: > Hi internals, > > In response to: https://bugs.php.net/bug.php?id=78480 > > I implemented: https://github.com/php/php-src/pull/7029 My general feeling remains that the "uninitialized" state is an awkward hack that we should be working to eliminate with better constructor semantics. A variable that remains uninitialised after the constructor almost always indicates a bug in the constructor, not a state that the rest of the application should care about. On the other hand, we have already allowed unset() to produce this special state, with defined behaviour for __get, so possibly the genie's out of the bottle, and we have to embrace it as a new "type". On the gripping hand, this is likely to lead to even more confusion about what exactly the different states are: properties declared with a type, properties declared without a type, properties not declared at all; all of which can be null, a non-null value, or completely unset. People already complain that isset() returns false for null variables (I disagree, but...); this function could end up even harder to explain. Regards, -- Rowan Tommins [IMSoP]