Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115169 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 73630 invoked from network); 28 Jun 2021 12:24:05 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Jun 2021 12:24:05 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 119071804D9 for ; Mon, 28 Jun 2021 05:43:50 -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=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, MISSING_HEADERS,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-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (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 ; Mon, 28 Jun 2021 05:43:49 -0700 (PDT) Received: by mail-lj1-f173.google.com with SMTP id d25so25493324lji.7 for ; Mon, 28 Jun 2021 05:43:49 -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:cc; bh=DSGrsVjI/KUxVwQ2sewVpmvcZTBrpK/Dm6hz8T41L8Y=; b=ZcsDJeTSpR4Dq7p0ZvBwE3LlFNldYBiJfQ68UOkCwAq8Ziv69Rd93Z208sRsX7wbu4 eEixiqf6qltLPBwpKckAKwV+mUj8CGsUTmXWOKndBqRtTeK7PLFujfK87MxzZ13ID2NJ 19Yyo527m8To27xzL+a7pri6uxLIi6Wb9TRAgXbz6jLl0PHNGGzjo36tVuKNWVHugNyn CxAVHgh2ZpuoZoURS6im4ZX832OECYZjODPsyhRnSBw6pNKYARnaUEy5XZP7GxtHY14j l3OS49EFLt4bcLSy/9u5JMKxip+3WRkmMrV23456OOck+sRMPlqDka5DahEsb8IlZH4g BFJQ== 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:cc; bh=DSGrsVjI/KUxVwQ2sewVpmvcZTBrpK/Dm6hz8T41L8Y=; b=Y8LIYbTaCJmg3M439D293gURTFakKuSfVvwGhtDtkkXrw9SlO3ckAzpBPRFd7P8dzQ DaOEmFb7pU7xR3j1rE+m9yYup3LO8b6/O3l8xNkzqF2m0cOUPVAe69kL0EPy9HJpTGyq pXCZYmKfsejTgFLBmTF3w4twI6updb2vPoVo9wxdnrr3k1kJ/YCoeLWtFkYIrmsBDd2n GZanwVIz47POrZ1Sfy+juaK6Q2okfAupPiLQUVpTs8CpxINUmzqwP1a9irWIwClW6SeK h4ZPUQtF3JvQanU6nZ/yhyZN5ApsDqWAzXr6BTOwALSysb9LvBp+C2oi9Q2Kv/2dwwLm GChQ== X-Gm-Message-State: AOAM530UZdrRyQJ/Fx6Qj7DWpNwc3rVrsXUYM3l2IELlaFcxwHKesF+t 9CJHZ+IuueQCTgRDNX8qzKVwdKjXsH8oHjuBmuHznJ2yw9g= X-Google-Smtp-Source: ABdhPJzr2VLSbgLXUs7Knv8zCZLfcPdfn8/GP6uqvRKdnQnIwh8nkU7LEJbMCRfye3IWevfm2ZzsLi73h2DkT3dI7jE= X-Received: by 2002:a2e:9116:: with SMTP id m22mr20037674ljg.93.1624884224205; Mon, 28 Jun 2021 05:43:44 -0700 (PDT) MIME-Version: 1.0 References: <88588b8f-5729-4458-90b1-c602f751e128@www.fastmail.com> In-Reply-To: Date: Mon, 28 Jun 2021 14:43:27 +0200 Message-ID: Cc: php internals Content-Type: multipart/alternative; boundary="000000000000fc282305c5d2d69a" Subject: Re: [PHP-DEV] [RFC] New in initializers From: nikita.ppv@gmail.com (Nikita Popov) --000000000000fc282305c5d2d69a Content-Type: text/plain; charset="UTF-8" On Tue, Jun 15, 2021 at 5:06 PM Nikita Popov wrote: > On Fri, Jun 11, 2021 at 5:02 PM Larry Garfield > wrote: > >> On Wed, Mar 3, 2021, at 9:03 AM, Nikita Popov wrote: >> > Hi internals, >> > >> > I would like to propose allowing the use of "new" inside various >> > initializer expressions: https://wiki.php.net/rfc/new_in_initializers >> > >> > In particular, this allows specifying object default values for >> properties >> > and parameters, and allows the use of objects as attribute arguments. >> > >> > The RFC is narrow in scope in that it only adds support for "new". An >> > extension to other call kinds should be straightforward though. >> > >> > Regards, >> > Nikita >> >> Hi Nikita. What's the status of this RFC? Are you going to bring it to >> a vote, or is something else blocking it? >> > > I've just pushed a larger update to the RFC, which limits the places where > new is supported. > > Supported: > * Parameter default values (includes promoted properties) > * Attribute arguments > * Static variable initializers > * Global constant initializers > > Not supported: > * Static and non-static property initializers > * Class constant initializers > > I believe the cases that are now supported should be completely > unambiguous and uncontroversial. The other cases have evaluation order > issues in one way or another. This is discussed in > https://wiki.php.net/rfc/new_in_initializers#unsupported_positions. > I plan to open voting on this RFC soon, with the current limitations in place. Based on the following discussion, there is interest in supporting static properties and class constants as well, but I don't think we're any closer to a consensus on how they should behave. Regards, Nikita --000000000000fc282305c5d2d69a--