Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114648 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19709 invoked from network); 27 May 2021 16:01:24 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 May 2021 16:01:24 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C17781804CC for ; Thu, 27 May 2021 09:13:12 -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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,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 mout.gmx.net (mout.gmx.net [212.227.15.18]) (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 ; Thu, 27 May 2021 09:13:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1622131990; bh=bToeWxdf+IhJzSm7ZkdkpLRZUM4dC9TMv7VGVdISKOg=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=K3Q/6Ki6xMgIhobD5nteEXfYoC+SclaP15rq4vR58H8yZfsCWO/aaeATAkfRq27sI TqZjFBpryp8vOF6lgv7NQlpXrzGDCkkF4OabUDjNuYHvxiN5QzudIwj0uMOj/hRduE hTL/OgxoK2pKsXSFGpqZENwDS2oNcOP8INwhKggU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.178.120] ([24.134.51.41]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MOzT4-1m4x2Y2VvY-00PQNu for ; Thu, 27 May 2021 18:13:10 +0200 To: internals@lists.php.net References: <319c4288-5934-b218-d6eb-0b787a2cdef1@gmx.net> Message-ID: <0ef9c29d-942f-15a1-27d4-89155ec81a90@gmx.net> Date: Thu, 27 May 2021 18:13:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Provags-ID: V03:K1:pWJcEFJgbGKPnw/u0s6zqhSwH1wyHtwbLHsLJuRqeaPOX1tc8KH wRM4up5VKN07qNYW03OcAo1Go3rLCkKNahrNV9cHUkh/mFt2BOR1KFY6nUXIi1br/WTyCra ui3liMx/eGyclD1MMWutmNXFj3EDgLH8nAntlsdVxODca2ixUWW2dLLtneuW6aPWJ3nTr4A vNCGxoZV/sFmhZbtiJEeA== X-UI-Out-Filterresults: notjunk:1;V03:K0:lFh5jRAQEqI=:MN5MSGJlv8C3IuJzm7aatn 92anJLjJ6qPTPHCv8uH6NQ+K3RCixOeP5oSHI7x8FdQxzptxg89AWwuMKMPPia9w4nzKbM/FV 7m/FXFbw2dBfZy51zSWMcQOarwIT0brXMJMaYvF7XFZC+EhcelkghWimY/F2BMI3oGhPMdArT achs+MOJCfH3vVBOydUBP083ZbdQem6SsXU3smPlnAsYMV0XIDDyCdz0e3tE0kvBXwfdQYCRc Ow+kCdd2GXahlz9N3CeIeUvyLRAXnLFaZ3Q3fOfOdedA+pjDQ8oMYToCHHRCGPMwObNOwDICz Sch1XfQlwaxO9LF7FL7SitYdv5hy8kRbVsPg5G3PG0rLviuS3BjLHXRoaM02KdjIyRaJkjhWJ wjhteosdyw25qu4eIvNY5i6NdD3IAOy8KDv57wcpiW5n2U1u9b5YMmVN4waX59vIy53IifdIg eQ45mjvsg2risaeNkJ2bhFkWHGOnCwtY9mA3Jt9J5OfdydgqbTaAi7sPW+i4MzQEjaYg2mycg OFxZx++T9SLZHwts3Tm3D0lhLbYV4EsPfhdRSVSHsbGZg5sTp2ce5TGGFtpGcHbTgpPFgjNQB yTxe4USu/m7qdT3nCaa+Gi5OuDYLEZQwNtkaUN7F4kPs/aHw5Pjp7/aFNIHR9xC7o1I8ZP32E iEcrIQarEQmESRp9KEg+/igEp2sr/jHtf42v+EOTdBjzNyt4ACDTS8KZ46dkDLYr3ahSAuDuq bBueXjQy6dNkeymb5rl4R1jApxfsR74hzUEAecQoAMbrKVS4WRUzux40xfnyBgudQGP8FzpbY vJIBo9qy/24xngDKk1ymP1NuZCiLLHtp9389W8jGffCtMrH3x9LGN+EqcweWrzGhvwqp+v2e2 jj5COtUdCEeHmWCJAU12b88VUEZ1xAZ2pjvM1Ku3YCDt+nQnnnIrhA55DY9XR/HlDrTayAPWR q6lbqyEDQ1oB+swioY5RFFaphpapP5d92BoNGjLyQqpJh+AXn2Lqn30db/PUwViBDeecJPFaE xVsRBiwY4bx/YnKYLhc/PkrYPlf7AlateFWS4IhZ2ttR32NaMI5XkLsTpCj0LTILWCIq++kIO sFHya1q1ZEFcTMMvLeOdIb/y39PozCgC9lm Subject: Re: [PHP-DEV] Consensus Gathering: is_initialized From: a.leathley@gmx.net (Andreas Leathley) On 27.05.21 16:43, Rowan Tommins wrote: >> isset in this case is abused to check for uninitialized, hiding the >> actual intent > > > On the contrary, the uninitialized state is what is being abused. If > you want to make the intent clear, use a clear flag of "needs > lazy-loading", or whatever you're actually using this magic "not null > but not really anything else either" state for. How is "uninitialized" magic? It is a state of a class property in PHP that is currently being exposed via reflection, and I have seen quite a few places where it occurs - for example with setter injection in frameworks, as an alternative to setting a property in the constructor. I also prefer properties with default values or values defined in the constructor, yet making it easy to check on something that already exists in the language only seems sensible to me - and I don't see a way of getting rid of that state anytime soon.