Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118967 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 61582 invoked from network); 4 Nov 2022 15:07:55 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Nov 2022 15:07:55 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E3FB9180041 for ; Fri, 4 Nov 2022 08:07:54 -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.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-vs1-f51.google.com (mail-vs1-f51.google.com [209.85.217.51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 4 Nov 2022 08:07:54 -0700 (PDT) Received: by mail-vs1-f51.google.com with SMTP id n68so4613229vsc.3 for ; Fri, 04 Nov 2022 08:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=U2kOk8RXmrIQuvymmHcrA1rjr8PYzTSeMr2Zglc4648=; b=duW2SgKE7Pjlb+e4beI21qn9yx69Rj0FNZYHcTxjGkMWrLPSJF3lZME2HRWeB00NgF oQlM+QsJaOQZ+rXj1nfbCm8eQBEKrfhKis/dSj8+xTj468U6mDCGJxnTRcno5d8SiKGl p2T1+Iu5B4kyu+a2LMpSVOruYkOmJDmfY0UxGwbQlMMWrvH4xQ+9dZjaeWEASqtfuoUq eoLfPakWAGkYKzpZEE1OPBJBVNUDxaOSIZle7nCph8mmaAmAgM9Xb8pZoI5POEYr6gXd ej5xrn1XroBHyXKQu5ghheoFvco0zr+SVdhSYrxoBBndcoue7fUnnfW/sGiQcO/pFpDO 4D/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=U2kOk8RXmrIQuvymmHcrA1rjr8PYzTSeMr2Zglc4648=; b=mk7iCfNkSH6+XPLdN1rbGgJIJdwCsUkpLCXVf4P1MCiR8hPZ616UtYfey49mlXHMcO oF67IqBMopbw0zjtyl7jQkKF+zW4ReFd1NcKJGhtyD79PZsD/G5jxItlwOxmeGE6RT8Q IT5ajGNaH/yxNhboVHX/+H/kE1BJHKn2CfIfSfGfeDNfjm9Yt9VyVVdIhOjg6dBMrpnU Lol5FwqyN74p6NcCzXYRrnV+JGiFbPyLB6zHWSgVkXXgtH/nVY3gLpcK2O91T7psbsCy OTp8hMGSFNUZjyrAkeRbaDXhzatIfP4DmwL+TQsJrxaouLMf5+XhJyt8keu/Pyu5p50d 4kJg== X-Gm-Message-State: ACrzQf18a1Ux1vVwNozq3fVYNqi6yfRYmrjR5N8xFFaDD+m4ZWc3kaQo KEQX8jFWvLRSjI+1ItLFSJZ0x4/EtGX631i2Kv8= X-Google-Smtp-Source: AMsMyM6uh0FS4lQp34nCFcQPdx8YqiY8tPBsMlgqWEUfyqCWsXZok7mBnHNgy+OyDZwS2gzayE9Nu+y5JTCfklUfuRw= X-Received: by 2002:a67:e3c9:0:b0:3ad:7f2:9ffd with SMTP id k9-20020a67e3c9000000b003ad07f29ffdmr13542800vsm.87.1667574473858; Fri, 04 Nov 2022 08:07:53 -0700 (PDT) MIME-Version: 1.0 References: <504f616c-05c1-45ef-991e-2b4c79f72d07@app.fastmail.com> In-Reply-To: Date: Fri, 4 Nov 2022 17:07:42 +0200 Message-ID: To: Marco Pivetta Cc: Larry Garfield , php internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC][Dynamic class constant fetch] From: someniatko@gmail.com (someniatko) > What's convenient about `Foo::{$bar}` vs `constant(Foo::class . '::' . > $bar)`? I'm a bit confused by this :| > > Is it the few keystrokes added? Even if ignoring syntax / convenience bikeshedding, I find it a really valuable addition to the language self-consistency. It's symmetrical to the already existing syntax of dynamic property fetch and dynamic method calls. One could argue that it's dynamic, too much magic and bad, but then we should either deprecate those features, or if not, have this symmetry. The Principle of Least Amusement and human pattern recognition overall with thank you.