Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114617 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 84286 invoked from network); 26 May 2021 12:46:08 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 May 2021 12:46:08 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3E0F01804D9 for ; Wed, 26 May 2021 05:57:40 -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=-0.7 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, 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-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) (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 05:57:39 -0700 (PDT) Received: by mail-io1-f45.google.com with SMTP id k16so840629ios.10 for ; Wed, 26 May 2021 05:57:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hxQ8N4M1cdWQNkyUzhEQzywmDzotTXDduuGrMueTtWk=; b=JNlPEPGgAGOxB8ilclQeKjcURSJuSs7ftBxtMYcnbxTROITCRu6lSzsMCqaZrL/Obo ddO2cDkq43QNcX9gLAl6cA+W63cwRbIMzxQFEM7Q3Dv+OfzzNd4izutUDt+YiW11Kfmk lIRFyJZO9zWul5DJzKW4QvajgAcGsuY1VZAnv7SWw+rxFTyan61xP9YF/EeiPefwC1r3 7IiBErZW9bGMNFRfzU/chOYdvZmxoBVZVGP79NtfMyvcPHQg+PdZ+rRUgYJTcVSoMfee tQkgtkwct/0CCKtdOUv3OzhjVWYVLmQGLUwJ/I542baY5apGTHLcJ7JhuRZ3cWmVk6j/ P47Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hxQ8N4M1cdWQNkyUzhEQzywmDzotTXDduuGrMueTtWk=; b=E42eKE5WpSwq+PU+s1muI5Qxmg+EXK7GupgEroGMMHBZP0IBextjNbd3SdkCiMstSM XUvmDvpApvb3qpNJKUW512SpFI4NVEENq+uA8BX89kymDfJrm59RVbypm+PYezmDiJtE jZui5cEjbCukKyPmPA1oNJ8o8trUnwb7YFznRxNbVH3QRY8+n+VgmIfu7R3PzG9EZr3Z pHowNOon93muAdCwWs05zW1RNCr7rz/iQ1GRzZHiTzq/E/lJEMJOHg6qtiYtAQavMTHS jIzjQ5cEapEp+sc0cxjR8H+SwgPSN4AnUFlcjWw5+bsK3J37DKWUoyKVvdmSUWht6xi2 mKDQ== X-Gm-Message-State: AOAM530Rjns/tvNkjtRQugtI+CO/1R+kaO771WvE3YL4mo0qwPQ6fUjN ce4CNExYF3Atz9lFX0h9MEdXYnVZG3Z6/x1c5Ys= X-Google-Smtp-Source: ABdhPJyrkdtOQQWI3hWKaPxkIhwtU9yDBrPNSdUgemPnvegjRb0u25EYC9OhZH8qSgZtbEI6FxW3f189A+4o6aj9mwU= X-Received: by 2002:a05:6602:2f0f:: with SMTP id q15mr26334101iow.75.1622033858612; Wed, 26 May 2021 05:57:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 26 May 2021 14:57:27 +0200 Message-ID: To: Joe Watkins Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000f4d65105c33b2f18" Subject: Re: [PHP-DEV] Consensus Gathering: is_initialized From: michal.brzuchalski@gmail.com (=?UTF-8?Q?Micha=C5=82_Marcin_Brzuchalski?=) --000000000000f4d65105c33b2f18 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =C5=9Br., 26 maj 2021 o 12:14 Joe Watkins napisa=C5=82(a)= : > Hi internals, > > In response to: https://bugs.php.net/bug.php?id=3D78480 > > I implemented: https://github.com/php/php-src/pull/7029 > > Not absolutely convinced that it's a good idea, I asked Nikita to review, > and he's unconvinced also and suggested a discussion should be started. > > You can read both of our thoughts about it on the PR. > > What I'm looking for now, is reasons that we are wrong - good use cases > that aren't born from code that is doing bad things ... > IMHO we don't need it, working with the typed properties since the beginning I thought only for a short period that I'd need this kind of feature but shortly realized that I'm doing it wrong if my code can reach such state, given that all paths now lead to a known state, object construction in all cases specifies all required properties without having any doubts like uninitialized properties so this is doable. If one really needs to check if a property is initialized or not I consider it a dark magic and such can reach up to the reflection mechanism to just check it. IMHO it's not common (or at least should not be) to have such a need. Cheers, Micha=C5=82 Marcin Brzuchalski --000000000000f4d65105c33b2f18--