Re: [PHP-DEV] [RFC] Generalize support of negative string offsets

2016-02-12 Thread Lester Caine
On 11/02/16 18:07, Stanislav Malyshev wrote: >> It does not worth the effort having other RFCs for >> > - $str{} = 'string' > Correct, because nobody needs it and it is a bad idea. > >> > I agree small changes are easier to review, but it may leave lots of >> > obvious inconsistency in PHP. We ha

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

2016-02-12 Thread Joe Watkins
Morning, 1 - I'm not completely certain what you are referring too ... list() has always felt a bit strange to me and this doesn't feel any stranger imo. 2 - Perhaps I agree, but perhaps I tend to think that it's because I'm not used to looking at it yet. 3 - This isn't relevant at the mo

[PHP-DEV] GOOD Benchmark Results for PHP Master 2016-02-12

2016-02-12 Thread lp_benchmark_robot
Results for project PHP master, build date 2016-02-12 06:31:18+02:00 commit: 44ed1cb previous commit:c6f2d61 revision date: 2016-02-11 22:15:11+01:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB

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-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 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
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 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: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 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 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: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