Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114610 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 64037 invoked from network); 26 May 2021 10:19:08 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 May 2021 10:19:08 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B4C4D1804E3 for ; Wed, 26 May 2021 03:30:38 -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,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-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) (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 03:30:38 -0700 (PDT) Received: by mail-il1-f179.google.com with SMTP id l15so433576iln.8 for ; Wed, 26 May 2021 03:30:38 -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=y4dvbGPtlOM1vsR8M1BkV7ew7/kzsC2VNfD05BLdRiQ=; b=cMpmouwroxlIhADZhfRM0aWojCjKDVG2XcNlegn0XHqLAfqss5I11q2wqZGdVgeTIV /N3yT9uySQggYPKhvqujpkQfV/Z28KR1Ll6cTcY3XqsOflmr6jtrdYBnm09pGC2/yI/W wdxyB1fOpdMVOrjI48TKw6IGW2OaYsC9kN37X6GuH5m+JDtzcLTVT/OjbdMriplsKPxE 8fRibCE8To+1jK2dqemGeCzpIj9lKLN2qxPJ9erBIDFw+K4OJOD9G8jiuRTZP9qTtc1r OhbSofYyoH0x8IS6bCbc6y3kWMGycYJGORHldmRggUGsGB5sfxGrpxkLgEjNj6mVPbuv 0oSA== 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=y4dvbGPtlOM1vsR8M1BkV7ew7/kzsC2VNfD05BLdRiQ=; b=iSKXJotq4n/ru+3v0Z9NhxSkbWMdM3RN6e5Ylfz0Cae3wJ4GaqQj7cOy51A/n80qrx 99eoDfR3X5yqSGLHDUaaLacBPEZ7jDoO9zFEcTV9wyV2FYAP+nwYQZGXJR7PAt1u5RwV 6gkM6s9PHY0U6kuqbnjxY0jSx4UrmJYBOBYswBbnTaI4jnE92vCCd3MsI227IPZYv1LK vkMJj34PSD/kel/TFsLqxXKhMBSTCw90RCZbr0Cp5zT9QK+iY3nn/6w5ZIICq860bOm8 jhMmGqMgBIj0t5s92YFeWAsHhN7fil/DPaPUzAXyhsE0azHoY59wEIv+3cTHbjTgXFob lTVA== X-Gm-Message-State: AOAM531g+ecAMuLmWANF618CxPVuh1rr/dJKaU2dOFPYU/M6AAZEO6FD ZnGpih4j7tbwW1XnufrIqTd/A3chJvooBgFYciw= X-Google-Smtp-Source: ABdhPJwaeueUq1oY3YmXP0CEm1tB+EmULOimOaOuAieV+39mAFkqk+tSWFD47U8ytj7De1s4HYxcSHABYQue2nAJtuI= X-Received: by 2002:a05:6e02:927:: with SMTP id o7mr22799270ilt.35.1622025036542; Wed, 26 May 2021 03:30:36 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 26 May 2021 12:30:25 +0200 Message-ID: To: Joe Watkins Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000001eb63505c339228a" Subject: Re: [PHP-DEV] Consensus Gathering: is_initialized From: ocramius@gmail.com (Marco Pivetta) --0000000000001eb63505c339228a Content-Type: text/plain; charset="UTF-8" On Wed, May 26, 2021 at 12:14 PM 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 > > 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 ... > > Equally if you think this is really bad even if the reason has already been > mentioned, please make noise. > What's the problem with good 'ol `(new ReflectionProperty(Foo::class, 'bar'))->isInitialized($baz)` ? If it's instantiation time/performance, I'm fairly sure that typical reflection instantiation caching works just fine (and a new API would need a lot of meaningful benchmarks to be warranted). Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --0000000000001eb63505c339228a--