Re: [PHP-DEV] [RFC][VOTE] Allow specifying keys in list()

2016-02-12 Thread Rowan Collins
S.A.N wrote on 12/02/2016 15:21: It's not just a matter of taste, the object is always passed by reference, an array is copied when you change, object literal syntax like JSON, sorely lacking in PHP. Objects are passed by *pointer*, because they're expected to have methods that mutate their st

Re: [PHP-DEV] [RFC][VOTE] Allow specifying keys in list()

2016-02-12 Thread S.A.N
2016-02-12 17:15 GMT+02:00 Rowan Collins : > S.A.N wrote on 12/02/2016 15:13: >> >> But is also necessary and the function or operator like >> object_assign($target, ...$sources) > > > Like I say, for that kind of purpose, I'd just use an array, which already > has the facilities for working with a

Re: [PHP-DEV] [RFC][VOTE] Allow specifying keys in list()

2016-02-12 Thread Rowan Collins
S.A.N wrote on 12/02/2016 15:13: But is also necessary and the function or operator like object_assign($target, ...$sources) Like I say, for that kind of purpose, I'd just use an array, which already has the facilities for working with arbitrary keys. But I know some people think $foo->bar "l

Re: [PHP-DEV] [RFC][VOTE] Allow specifying keys in list()

2016-02-12 Thread S.A.N
2016-02-12 16:55 GMT+02:00 Rowan Collins : > S.A.N wrote on 12/02/2016 14:39: >> >> 2016-02-12 16:27 GMT+02:00 Rowan Collins : >>> >>> S.A.N wrote on 12/02/2016 13:37: Often all keys are unknown, or a very lot keys, use list(...) - is unreal. I would like to, instead >>> >>

Re: [PHP-DEV] [RFC][VOTE] Allow specifying keys in list()

2016-02-12 Thread Rowan Collins
S.A.N wrote on 12/02/2016 14:39: 2016-02-12 16:27 GMT+02:00 Rowan Collins : S.A.N wrote on 12/02/2016 13:37: Often all keys are unknown, or a very lot keys, use list(...) - is unreal. I would like to, instead $value) { $this{$key} = $value } Use the short syntax sugar It's really do?

Re: [PHP-DEV] [RFC][VOTE] Allow specifying keys in list()

2016-02-12 Thread S.A.N
2016-02-12 16:27 GMT+02:00 Rowan Collins : > S.A.N wrote on 12/02/2016 13:37: >> >> Often all keys are unknown, or a very lot keys, use list(...) - is unreal. >> >> I would like to, instead > >> foreach($params as $key => $value) >> { >> $this{$key} = $value >> } >> >> Use the short syntax sugar

Re: [PHP-DEV] [RFC][VOTE] Allow specifying keys in list()

2016-02-12 Thread Rowan Collins
S.A.N wrote on 12/02/2016 13:37: Often all keys are unknown, or a very lot keys, use list(...) - is unreal. I would like to, instead $value) { $this{$key} = $value } Use the short syntax sugar It's really do? If the keys are unknown, then you probably don't want to blindly copy them on

Re: [PHP-DEV] [RFC][VOTE] Allow specifying keys in list()

2016-02-12 Thread S.A.N
Often all keys are unknown, or a very lot keys, use list(...) - is unreal. I would like to, instead $value) { $this{$key} = $value } Use the short syntax sugar It's really do? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC][VOTE] Allow specifying keys in list()

2016-02-12 Thread Bob Weinand
Hmm, I have to disagree… 1. Just as intuitive as the whole list() construct. I don’t see where this particular addition adds any strangeness. For your readability/hard to read code problem I think the RFC is just doing a bad formatting job: list("name" => $this->name, "colour" => $

Re: [PHP-DEV] [RFC][VOTE] Allow specifying keys in list()

2016-02-08 Thread Yasuo Ohgaki
Hi, On Mon, Feb 8, 2016 at 3:34 PM, Pierre Joye wrote: > On Fri, Feb 5, 2016 at 7:55 PM, Andrea Faulds 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

Re: [PHP-DEV] [RFC][VOTE] Allow specifying keys in list()

2016-02-07 Thread Pierre Joye
On Fri, Feb 5, 2016 at 7:55 PM, Andrea Faulds 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 ope

Re: [PHP-DEV] [RFC][VOTE] Allow specifying keys in list()

2016-02-06 Thread Andrea Faulds
Hi Levi, Levi Morrison wrote: 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 eval

Re: [PHP-DEV] [RFC][VOTE] Allow specifying keys in list()

2016-02-05 Thread Marcio Almada
Hi, 2016-02-05 23:58 GMT-04:00 Levi Morrison : > On Fri, Feb 5, 2016 at 5:55 AM, Andrea Faulds 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 specifica

Re: [PHP-DEV] [RFC][VOTE] Allow specifying keys in list()

2016-02-05 Thread Levi Morrison
On Fri, Feb 5, 2016 at 5:55 AM, Andrea Faulds 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 ope

[PHP-DEV] [RFC][VOTE] Allow specifying keys in list()

2016-02-05 Thread Andrea Faulds
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