On 01/11/2022 00:05, Bob Weinand wrote:
Am 16.10.2022 um 23:11 schrieb Bob Weinand <bobw...@hotmail.com>:

Hey,

I've written a small RFC about adding coalesce ability to list() destructuring.

This should enhance the ability to easily, concisely and readably destructure 
arrays with default values.

https://wiki.php.net/rfc/destructuring_coalesce 
<https://wiki.php.net/rfc/destructuring_coalesce>

Bob
Hey,

Given  haven't heard much feedback, I'll open the vote by end of the week,

Bob


Unless I'm missing something, the one response you did get contained some questions that you didn't answer?


As for my own reaction: the simple examples look useful, and maybe are enough to include the feature. I find nested destructuring a bit confusing to read at the best of times, and some of the examples like [[$a ?? "default"] ?? []] = $array make me go a bit cross-eyed, but you make a reasonable case for the choice of semantics, and I don't really have a strong reason *not* to allow it.

Regards,

--
Rowan Tommins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to