Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117828 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 79473 invoked from network); 29 May 2022 16:58:31 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 May 2022 16:58:31 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 55338180212 for ; Sun, 29 May 2022 11:42:01 -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-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (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 ; Sun, 29 May 2022 11:41:57 -0700 (PDT) Received: by mail-ed1-f47.google.com with SMTP id v25so2962615eda.6 for ; Sun, 29 May 2022 11:41:57 -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=Q4xrj06CGsbVik5lOvYikoeDA2cQx+CuWM9Dr/znzfc=; b=LCZOdyYg/dTFaGJxpxlvvBVQDwgPvv0VAhuZiSsXS8+iPSwJsHcSFx3tOwVitCzKYO sPKhIcspnGtsNVatLyBAXK5ADzetA9botvMxyoOiC/ht3EDkuYhhePrX+4C2/Al+6RVf BQpDmy+g+76m/tgiza2OdUlsQqylk5F9Pu24XftRJluhjMjkLFqYfWg92s/hfOW7KqDz fC98/MgAMvGqqlT4wn8jEqOtmro7NrFCR7jlpLRhMRKCc+GY/4qZJlZbnHXKFULTOL8y ZvQCeCeDRWFKcaZ7CISVcCSKKl5LHRg/ycyAQ7nRuqiDZD6oddv92wJCT6qZ/NwaxfZ0 Qziw== 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=Q4xrj06CGsbVik5lOvYikoeDA2cQx+CuWM9Dr/znzfc=; b=Gp36tmaXqIv+Ozkx9WrbOPg7j+pp/rIqCS8bJStBAb/2epHgFWMtr+10ZOh/hMAq59 bk5jk6Dwj549yHZtuE+ci9ZqkwEQHHoEFDgOdszQUKBK0DlG9jwf7ucJC6LH1zF0jhm1 cdjWfmjfcrfOmH1lxwYwC+U8w50wTpsuy4mSEujAWreZtRI+wWoRaPYPqXn9CQL0faVC FM9VxV0pQq6BtqDKd1tiBKM6k/VvC1BXJRi4RvPv1OO5myX+/eWsBR2a9NWbkFp/8lc7 hyGRmqLs+A51Gett0kq/u5O2Z2952Os1eYPoSjGJN/gFgsQbSMFsDFSBUKypxPXZjS5y SuAw== X-Gm-Message-State: AOAM530wv4Zws4iOOaCH82/elaZUoAAOoJbm/iuIWappHaRvUntEcUof 4P4jrDwPkfjM1V5sW87+2whjm5dN/XpEpowXDQs= X-Google-Smtp-Source: ABdhPJy50xR4svlT+zhy0/9vBvh0r8phKe5Os6/KIFKADrIGqoG7uTP83RcVdotIjkvBdUIBDxL00PR9QcIDZK+XB80= X-Received: by 2002:a05:6402:b34:b0:42b:7c29:dbc with SMTP id bo20-20020a0564020b3400b0042b7c290dbcmr31435932edb.113.1653849716511; Sun, 29 May 2022 11:41:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 29 May 2022 21:41:39 +0300 Message-ID: To: Ilija Tovilo Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000dd752005e02ae41f" Subject: Re: [PHP-DEV] [RFC][Under discussion] Fetch properties in const expressions From: drealecs@gmail.com (=?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?=) --000000000000dd752005e02ae41f Content-Type: text/plain; charset="UTF-8" On Sat, May 28, 2022 at 12:44 PM Ilija Tovilo wrote: > 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. > I feel that the RFC should be named "Fetch properties in initializers", in sync with https://wiki.php.net/rfc/new_in_initializers You explain what "constant expression" means but I feel that using "initialize expression" would be more clear. From what I understand, "constant expression" is named like this because until PHP 8.1 it really was a constant. And of course because internally this is how the functions in code are named: - zend_is_allowed_in_const_expr - zend_compile_const_expr - zend_const_expr_to_zval It's unclear how easy it would be to rename them to init_expr instead of const_expr but it might be worth it if we consider that "initialize expression" is a better name. The RFC looks great and clear. Regards, Alex > > Regards, > Ilija > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > --000000000000dd752005e02ae41f--