Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114890 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 94528 invoked from network); 15 Jun 2021 14:49:53 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Jun 2021 14:49:53 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 305CF1804D1 for ; Tue, 15 Jun 2021 08:06:25 -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 autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (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 ; Tue, 15 Jun 2021 08:06:24 -0700 (PDT) Received: by mail-lj1-f176.google.com with SMTP id b37so9475014ljr.13 for ; Tue, 15 Jun 2021 08:06:24 -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:to :cc; bh=04j/oaM3F1jCbvum/qLC6k+bt8Jun5vZDYlbGjHORG4=; b=gTjL1RD8iZZt74FbBrWyqgts3wV553sQ9TTWGlACvZCQtGqqCvPsncLD5tFnqDRvMh UwR3BvSLTDKjCUMLGhSZwttZITz1fKi3OWsC4hPBfji8nnDd9AtrKE3MVGYP4Sv5k6GA sdB0sxHq4Xc5rhGNFKzOETm8VJbcFmembl/hbzJqZguBdFGKy1iO5O5v+Qempe/WXJB0 zom/gtvxN9IL7Xsbdu58z6DXwF90A4s/G/Rg7gpAQnBXByXDee+P85jbcpcsaPCVu7+y kmb8vca5J0I0pJ63PUc1OjWRyuDhOGGE082tfqIQX/dgSX1QayeLwoU/3N8WF//P74IR I1uA== 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:to:cc; bh=04j/oaM3F1jCbvum/qLC6k+bt8Jun5vZDYlbGjHORG4=; b=GSuMz65eWbgbrwq7J3IA6vHmHlKmJg6AmKzfvhbUOkqNYMEZyf9C1L3Ac2sjLyI7KY JcQAig5krtjJ7d2QEWxiKxeJBpVNra1W63O8HxnLNCsnV/4dSVBxwN3j+LTLIJKTH7p5 7321JrZZT9YQOB1EAJ9Z8BxC80LI1S5k8GIdJdEuYgWSF/fsYuI8D22WNji0kT6Ps29i MU+9PX0VocOBCgCzEnCLaZQJ0S86G5QUH4YriZxIsJt+5QjPLE1ORr1yM08ah8IWC6Su zgYyfEUdnYJrEin8x9jyJ5wUWZxmiUztwjRUpKBygzH+ya9EQ80HF6R8a3WQoQcu5z8c 0CrQ== X-Gm-Message-State: AOAM532EyDdKZE4pr/bZeDhWE5l5RoMRpPT5JOgFzvJFqz2i5Dh/oSA+ 6f1TRnQjLksZCMaa7IsOCbJVVNgidB7WfWrC8/FEBtrLNR79PQ== X-Google-Smtp-Source: ABdhPJyhmWH5WOsUM57Bz8ZF9mQ+dypRynAAsNkb6mX/FwJHgydX3KKdpbQ+PMPem111Xsf0QjU44YmENukhjqEn4j8= X-Received: by 2002:a2e:8197:: with SMTP id e23mr53921ljg.452.1623769582020; Tue, 15 Jun 2021 08:06:22 -0700 (PDT) MIME-Version: 1.0 References: <88588b8f-5729-4458-90b1-c602f751e128@www.fastmail.com> In-Reply-To: <88588b8f-5729-4458-90b1-c602f751e128@www.fastmail.com> Date: Tue, 15 Jun 2021 17:06:06 +0200 Message-ID: To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="000000000000222c7d05c4cf513b" Subject: Re: [PHP-DEV] [RFC] New in initializers From: nikita.ppv@gmail.com (Nikita Popov) --000000000000222c7d05c4cf513b Content-Type: text/plain; charset="UTF-8" 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. Regards, Nikita --000000000000222c7d05c4cf513b--