Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114620 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 92304 invoked from network); 26 May 2021 13:57:57 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 May 2021 13:57:57 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4FD821804DF for ; Wed, 26 May 2021 07:09:29 -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,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 07:09:28 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 63FE75C0296 for ; Wed, 26 May 2021 10:09:28 -0400 (EDT) Received: from imap8 ([10.202.2.58]) by compute3.internal (MEProxy); Wed, 26 May 2021 10:09:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=Q45FED ZxwyYRIlEotiQtGxsSP1IP5u0x8DsMAJfplEM=; b=I82MOFch1+SrbOhI257QGy pCXPYvdzHaVwWwP/UhddU88xw48wYmdFVmwb5m2iz4v5iKJD54QNBxNtbrJ8doXr 8Ne1loTxrm/OJLxXEkpC6oZnml5neDY0zTsp/WNianSYWSvJfMZhNqFNfi+xdp4G HDlSXioBl6cEkB4fbf3EdsC4q1pSe1T7UlfQkANTlo9GhE08iKXp6Y0ccMQSmB8t giI/NSptZzauqXomKPigkeOvM77EB6urh61BaxP55eWycZod6tBZ2Mqy1kAkhXZN z0zkrXP9bbysKyn0y97zpJSRKePi+RpESCoejmmj3ktzas23ljxrW0XElCQxm0bw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdekfedgjeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpeefteevffetteeuueekgeejffduueehtdfhveefheei hfehgeehffehtdehgfeljeenucffohhmrghinhepphhhphdrnhgvthdpghhithhhuhgsrd gtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhep lhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0D4CB3A0130; Wed, 26 May 2021 10:09:28 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-448-gae190416c7-fm-20210505.004-gae190416 Mime-Version: 1.0 Message-ID: <2874cf7c-e55d-4100-bb01-af11a5ab6e87@www.fastmail.com> In-Reply-To: <80fb5a8e-d770-49fd-45d5-ea6f4b004513@gmail.com> References: <80fb5a8e-d770-49fd-45d5-ea6f4b004513@gmail.com> Date: Wed, 26 May 2021 09:09:07 -0500 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] Consensus Gathering: is_initialized From: larry@garfieldtech.com ("Larry Garfield") On Wed, May 26, 2021, at 8:24 AM, Rowan Tommins wrote: > 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. I am inclined to agree here. What I don't know about is the cases noted in the bug, such as GraphQL or other serialization cases where "null" and "absent" are not quite the same thing. That is probably sufficiently edge-case to not deal with directly, especially when the more verbose alternative still exists, but that's the only reason I'd even consider making uninitialized something other than "your constructor is bad and you should feel bad." --Larry Garfield