Re: [RFC] [DISCUSSION] Compact Object Property Assignment
| From: | Mike Schinkel | Date: | Mon, 16 Mar 2020 18:40:16 +0000 |
| Subject: | Re: [RFC] [DISCUSSION] Compact Object Property Assignment | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-109078@lists.php.net to get a copy of this message | ||
For reference:
https://wiki.php.net/rfc/object-initializer
https://externals.io/message/106947
That was quite the discussion, and it started only 6 months ago.
-Mike
> On Mar 16, 2020, at 10:10 AM, Matthew Brown <matthewmatthew@gmail.com> wrote:
>
> I love the idea!
>
> The syntax for new objects looks a little verbose – would it be possible to
> use
>
> $foo = new Foo()[
> property1 = "hello",
> property2 = 5,
> ];
>
> as an alternative to
>
> $foo = (new Foo())->[
> property1 = "hello",
> property2 = 5,
> ];
>
>
> On Mon, 16 Mar 2020 at 07:48, Jakob Givoni <jakob@givoni.dk> wrote:
>
>> Hello Internals,
>>
>> I'm opening up my new RFC for discussion:
>>
>> https://wiki.php.net/rfc/compact-object-property-assignment
>> - A pragmatic approach to object literals
>>
>> Let me know what you think!
>>
>> Best,
>> Jakob
>>
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>