Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118968 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 63914 invoked from network); 4 Nov 2022 15:15:16 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Nov 2022 15:15:16 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 02B88180041 for ; Fri, 4 Nov 2022 08:15:16 -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, 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-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) (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:15:15 -0700 (PDT) Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-36a4b86a0abso46179317b3.7 for ; Fri, 04 Nov 2022 08:15:15 -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=1ilsSdeAREH5bxtTu+zQceSl/ygKuRXdHZGTLdidRSg=; b=pz3j1KZ3fVaGXuRSUiS1YwMrn9I1PowSqfeSyr06bC/aI6wUI91JogY/s+2mmfoqjr dxrgSphISBCk7q3ABWSuylVeMwIQHTuxne0a37bHdx62Z0rx0/2cpUbWJaSkqgKgf4gL ZuuzakwA8ATwxdIrv+RgSMWveULo1qC8lpLRqRV5CG+8hcc3yHg9aMznUHFOsXo6zqUL jRqviUUimGAX85+iN7OZ3sA7ZEEwaDCsf34nd9912jjg+5IOesYE9MH5SLl8PM96P/Cn 5p9Vbr8QlLL1qbXsMrGZjnmHEnbqEFXLQRR3NjiNuEhdmyTM9teTfTzCWUceTMWNCUVW cGoA== 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=1ilsSdeAREH5bxtTu+zQceSl/ygKuRXdHZGTLdidRSg=; b=o/4GiSDNZVaA34YM0T/OilPiwAEy3aSzass9BlMLwYKnm5KpSgDvpDs+8E5nYAyCPU bkjIW3A7Lr7sAQH74HNkQ34alt58wo95rRr7rAI8wyB1JSiY4YLvL5T3SeaDdYLdUILe rppPqaWxuREjGxXF4Bgjls8hSQlHa8FO9MKKLE5rRrrixjRK7laB4sFaj0wY6Jit80VA Epx9HwAfdzD2qIjPxnS7mDtkxzT81Jp3nnbEd5SLPCeb6e8cu3XvVUHQYcaoKxJ86DwT 0PuohLf/WMh1fAb4wIFs7Pm9bdj+aOt2oDwTGAT/8HlUB2pMVwG4yHzmQtrKZxLD2nA4 wExg== X-Gm-Message-State: ACrzQf1tbkE31arOe4sCcOLG3Q/gJb3WOid3GODgj7+KXb2p/LQ7fQkJ jXRQi/mmhCD77F2AZu72DiztaUIYuY2HTalwqyI= X-Google-Smtp-Source: AMsMyM7mrZULLcbNKcHAXq2XEZI1sp1u0qK/UU4K3OgrzZFjRjdx+2TM8YM1uODX8S8LoMtMNlfp4yNziSzrh0JedAs= X-Received: by 2002:a81:124a:0:b0:369:f470:39e9 with SMTP id 71-20020a81124a000000b00369f47039e9mr34159600yws.173.1667574915029; Fri, 04 Nov 2022 08:15:15 -0700 (PDT) MIME-Version: 1.0 References: <504f616c-05c1-45ef-991e-2b4c79f72d07@app.fastmail.com> In-Reply-To: Date: Fri, 4 Nov 2022 12:15:03 -0300 Message-ID: To: someniatko Cc: Marco Pivetta , Larry Garfield , php internals Content-Type: multipart/alternative; boundary="000000000000725e9205eca68a5c" Subject: Re: [PHP-DEV] [RFC][Dynamic class constant fetch] From: flaviohbatista@gmail.com (=?UTF-8?Q?Fl=C3=A1vio_Heleno?=) --000000000000725e9205eca68a5c Content-Type: text/plain; charset="UTF-8" On Fri, Nov 4, 2022 at 12:08 PM someniatko wrote: > > 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. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > I agree with @someniatko, it makes PHP more consistent, which IMHO is always positive and one of the usually criticized points (lack of consistency throughout parameter order, naming convention etc). --000000000000725e9205eca68a5c--