> On Jun 15, 2021, at 11:06 AM, Nikita Popov <nikita....@gmail.com> wrote:
> 
> On Fri, Jun 11, 2021 at 5:02 PM Larry Garfield <la...@garfieldtech.com 
> <mailto:la...@garfieldtech.com>>
> 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

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

Reply via email to