Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114900 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 62589 invoked from network); 16 Jun 2021 03:29:31 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Jun 2021 03:29:31 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 513A91804D1 for ; Tue, 15 Jun 2021 20:46:07 -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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (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 20:46:06 -0700 (PDT) Received: by mail-qk1-f177.google.com with SMTP id f70so1186226qke.13 for ; Tue, 15 Jun 2021 20:46:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=7b9SO1r6lYwMzIIKjDknVYOYCPuWFgB/+lLpHUsf0yk=; b=Va2Yqp5CKMfMcOfQGr8S5ipvlZa13FOZm9gBXJw0RKFmSUcKvr33RP5vVp40Cw4DQ6 cY+hsrUyPtZ8bPH9p8kHR+V+zSugO1EsgLu7pkoo8PGjHhpG5w4274dSnAvbcufebIjR MBjBMlsXSSapQus/uwOEPiFeq44RV0htIjXd4jZX74vYYlFnJ3DGaEF6pxxdrVqaKkV5 1caaqVi7oym3p81Ws/qyIGav0+DIY5xQt30sx0TKnuhB+7aYcNi/JFESdCL7iH4q0cQi QjIHSiTt5nzvzIsAvtCARrzmNhz6HWQh+HF0PbHQ6UemC0SWOSX5+m4Q1OjF1txsbCb0 kGdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=7b9SO1r6lYwMzIIKjDknVYOYCPuWFgB/+lLpHUsf0yk=; b=K9hgBjcCiVfoL2kfvUsnIl6zRZ3gEsX+7CblcZm0rseNUG1Nd7y1BfVjHLsS3lg+hM nthb/rAwpViITRYLjej23G3hX3MSdzwc7HvoK+l1VVOH1X78WMpz7eWUAHp6n30im6xI MUzAZwizIA1D6zlgpTFJa8g91D5kcySVEufVPml2QehgtUJaqLInGbg9BLeV6SoO+vyj 99lHFeNnqbqEObz8IAGc3xoLFi5tRfHOlbMs8Q1vHJ6GME/EcOfLa05rNULxCmD5PiaB h4cfuHD+eJlB+Ionyt/wpabn5y3vBZ2IrZ5Dt8qEQ6lueB8H918JhJSXfVyknk9801zH uhpg== X-Gm-Message-State: AOAM532wAMUFMkkaHZGpAl64RyA+4duZtqVINJxkWV9KlB2/FsVTT1kn NtPvIsNGn6c8IK+SytWGwBV47w== X-Google-Smtp-Source: ABdhPJwKrLzIaTMHU2jNoJ/q3P/IH4h6/CkIPVv/DUUPZU2pneW7Wq51xuI7YIcPRwsRDxIcmynJXw== X-Received: by 2002:a37:485:: with SMTP id 127mr2977783qke.277.1623815164414; Tue, 15 Jun 2021 20:46:04 -0700 (PDT) Received: from [192.168.1.10] (c-24-98-254-8.hsd1.ga.comcast.net. [24.98.254.8]) by smtp.gmail.com with ESMTPSA id p17sm806973qkm.72.2021.06.15.20.46.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Jun 2021 20:46:03 -0700 (PDT) Message-ID: Content-Type: multipart/alternative; boundary="Apple-Mail=_9887F74C-19FE-4C63-B92A-8619ADA7163C" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Date: Tue, 15 Jun 2021 23:46:03 -0400 In-Reply-To: Cc: Larry Garfield , php internals To: Nikita Popov References: <88588b8f-5729-4458-90b1-c602f751e128@www.fastmail.com> X-Mailer: Apple Mail (2.3608.120.23.2.7) Subject: Re: [PHP-DEV] [RFC] New in initializers From: mike@newclarity.net (Mike Schinkel) --Apple-Mail=_9887F74C-19FE-4C63-B92A-8619ADA7163C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jun 15, 2021, at 11:06 AM, Nikita Popov = wrote: >=20 > On Fri, Jun 11, 2021 at 5:02 PM Larry Garfield > > wrote: >=20 >> On Wed, Mar 3, 2021, at 9:03 AM, Nikita Popov wrote: >>> Hi internals, >>>=20 >>> I would like to propose allowing the use of "new" inside various >>> initializer expressions: = https://wiki.php.net/rfc/new_in_initializers >>>=20 >>> In particular, this allows specifying object default values for >> properties >>> and parameters, and allows the use of objects as attribute = arguments. >>>=20 >>> The RFC is narrow in scope in that it only adds support for "new". = An >>> extension to other call kinds should be straightforward though. >>>=20 >>> Regards, >>> Nikita >>=20 >> Hi Nikita. What's the status of this RFC? Are you going to bring it = to a >> vote, or is something else blocking it? >>=20 >=20 > I've just pushed a larger update to the RFC, which limits the places = where > new is supported. >=20 > Supported: > * Parameter default values (includes promoted properties) > * Attribute arguments > * Static variable initializers > * Global constant initializers >=20 > Not supported: > * Static and non-static property initializers > * Class constant initializers And I am saddened by the lack of class constant initializers. That's = the main use case I am interested in and I had been watching this RFC = anxiously for that one reason. . (In particular, because it would allow = me to assign classes to constants with __ToString() methods to lazy load = information.) > I believe the cases that are now supported should be completely = unambiguous > and uncontroversial. Well, at least it is the former. :-) -Mike --Apple-Mail=_9887F74C-19FE-4C63-B92A-8619ADA7163C--