Re: [RFC][VOTE] Allow specifying keys in list()
| From: | Levi Morrison | Date: | Sat, 06 Feb 2016 03:58:00 +0000 |
| Subject: | Re: [RFC][VOTE] Allow specifying keys in list() | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-91095@lists.php.net to get a copy of this message | ||
On Fri, Feb 5, 2016 at 5:55 AM, Andrea Faulds <ajf@ajf.me> wrote:
> Hi everyone,
>
> It's been more than two weeks since I first proposed this RFC, and there's
> no outstanding issues preventing moving towards a vote. There's not yet a
> language specification patch, but that can be done later.
>
> So, I'm opening the vote on this RFC today, 2016-02-05, and it'll close the
> Sunday after next, 2016-02-14. The vote requires a 2/3 majority as it's a
> language change.
>
> The RFC page is here: https://wiki.php.net/rfc/list_keys
>
> Happy voting!
> --
> Andrea Faulds
> https://ajf.me/
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
I wanted to chime in since I voted no. I'm not strongly opposed to
this behavior but I do have concerns about the key behavior that was
changed. In an example in the RFC:
list($foo => $bar) = $array;
I don't think this really makes sense.
$foo is being evaluated and
its value is used to look up the key in $array, but $bar is being
assigned to even though it's a similar place as $foo.
I don't think I've really expressed well what I am trying to convey
but I think this RFC would be much better *without* this change, so
I've voted no.