On Tue, Jul 17, 2018 at 6:24 AM Gabriel Caruso
wrote:
>
> Hi Levi, thanks for bringing this discussion.
>
>> Recently I've been scrutinizing array_slice. It's been painful.
>>
>> For instance, `$preserve_keys` is totally ignored for string keys.
>> This was undocumented until Christoph integrated
Hi Levi, thanks for bringing this discussion.
Recently I've been scrutinizing array_slice. It's been painful.
>
> For instance, `$preserve_keys` is totally ignored for string keys.
> This was undocumented until Christoph integrated it 2-3 days ago
> (thanks, cmb). However, this is really not a goo
On 17/07/2018 05:11, Levi Morrison wrote:
Fixing `array_slice` would probably do more harm than good at this
stage. Instead I would like to provide an alternative function that
does not have all this baggage, and will have decent performance much
of the time. The best ideas I have for names are n
Am 17.07.2018 um 07:35 schrieb Zeev Suraski:
On 17 Jul 2018, at 7:12, Levi Morrison wrote:
Fixing `array_slice` would probably do more harm than good at this
stage. Instead I would like to provide an alternative function that
does not have all this baggage, and will have decent performance much
On Tue, Jul 17, 2018 at 2:11 PM, Levi Morrison wrote:
> And another: `$length` is a length when it's a positive number, but
> it's an offset from the end when it's negative.
>
That's how substr() works, so it's at least consistent with that.
It makes a lot more sense if you think of it as
$arra
> On 17 Jul 2018, at 7:12, Levi Morrison wrote:
>
> Fixing `array_slice` would probably do more harm than good at this
> stage. Instead I would like to provide an alternative function that
> does not have all this baggage, and will have decent performance much
> of the time. The best ideas I ha
Recently I've been scrutinizing array_slice. It's been painful.
For instance, `$preserve_keys` is totally ignored for string keys.
This was undocumented until Christoph integrated it 2-3 days ago
(thanks, cmb). However, this is really not a good design decision: why
have a parameter that is called