Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118092 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 49657 invoked from network); 24 Jun 2022 14:53:42 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Jun 2022 14:53:42 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1D5FE1804D4 for ; Fri, 24 Jun 2022 09:43:45 -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-f180.google.com (mail-yw1-f180.google.com [209.85.128.180]) (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, 24 Jun 2022 09:43:44 -0700 (PDT) Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-3176b6ed923so29995427b3.11 for ; Fri, 24 Jun 2022 09:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rSxr043YUxy/WoJWMdpH/3xekq08gHbdZHbTWD1pHIE=; b=gEO65J2LFY7Jd5f/TakN0uWb4rPCJ4of9zRsSE5sv85tbtlHoSeWA9wUPpjPKZkTym BUT85lFpuLTn/+2s1IQbX80c/fS4bG/RVk25WOm6kzZ/fErsB9QTpPPEk2lX2yper3Iv AxqpvQJvsypaDNjlLJu3SNKAekRwbCAjxbp8Ak4iIhN4foNTW74I158z9gLyTlWt/+VO Gn5EbIjsng1YzESDpcY9iHsXle5XQvfALsfWgKdELtniS+0hivH4TP8RNQGQP8/CttF7 /6uQh3YvIYwHrXUzg3t/ruXmOhuKWBzArjmTHpoMxmoyTVDQu/AxraNKygu9QD6hvMSV PmzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rSxr043YUxy/WoJWMdpH/3xekq08gHbdZHbTWD1pHIE=; b=putNM6AXr1bzXIWLDmBU6cFQ4+Zzmjf/Mf5caSfKlOnpEQ4tcBWRsfmEy8MmEYK+GH KWen452zV1iodYG4EI+k9OuLuYdO66suq7nZkrSce4z46fOwaQDKdPD3yhVmlenqITqd kZqVcdTp2rlYGJSW7hHIqzS31XMhNgCtrOmDPL2h1W9LXZkeMVucf4Fpq0tHgaEKW2Uq Xr/LMdaViqleEShlX6KrfbLDf3KGYDE2RIhHoff6TqiZ8JzI482h57jDds8/XRNnPRxI B2tF90Z2zf79buMkCE62jzB2CpTdji4DAbLWgqR6G/IfgIogGUpNiIUeCpTZx9G5umO/ MTLw== X-Gm-Message-State: AJIora+9+IwEZFvqQu6NTM39o+gqH5ze371lEL7WQwPQIu3V+LsCOO+G WEiBQlqwPy/Azo6fpzVlrHhlfTpG79iRF/5wjBM= X-Google-Smtp-Source: AGRyM1u+HgSrfNiLbjDATc4lhr9IbtXRv4zUN9/9Jr95fsucheZtw+5G6LrV+EiUyQFlEwLE04wTsMTaG8F45T0z+wE= X-Received: by 2002:a0d:e892:0:b0:318:11e4:28b0 with SMTP id r140-20020a0de892000000b0031811e428b0mr17824025ywe.157.1656089024131; Fri, 24 Jun 2022 09:43:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 24 Jun 2022 18:43:32 +0200 Message-ID: To: Larry Garfield , Benjamin Eberlei Cc: php internals Content-Type: multipart/alternative; boundary="000000000000fff50605e234454b" Subject: Re: [PHP-DEV] [RFC][Under discussion] Fetch properties in const expressions From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000fff50605e234454b Content-Type: text/plain; charset="UTF-8" > > Hi everyone > > > > I'd like to start a discussion on a simple RFC to allow fetching > > properties in constant expressions. > > https://wiki.php.net/rfc/fetch_property_in_const_expressions > > > > The RFC proposes adding support for fetching properties in constant > > expressions using the -> operator. I'm looking forward to your > > feedback. > > > > Regards, > > Ilija > > The enum-in-attribute use case came up recently in Symfony. I'm in favor > and the RFC looks good to me. > Genuine question: In the thread about auto-implementing Stringable for string backed enums, there is extensive argumentation to explain why ppl that use enums this way are wrong. You mentioned writing a blog post about these reasons Larry, and Benjamin (/cc) also expressed a similar opinion. So my question is: don't these arguments apply here also? Shouldn't we reject this RFC and tell ppl to use consts instead? If not, why? Nicolas --000000000000fff50605e234454b--