Web lists-archives.com

Re: [PHP] xarray - The missing array functions you are looking for, implemented in Extension




Yeah I think some of the functions are pretty specific, so it might be not for general purposes.

And once we make it as the part of language itself, it's hard to decouple the release cycle (will be much longer...) and changing API will be a hard task.


> On Oct 15, 2015, at 06:44, Ryan Pallas <derokorian@xxxxxxxxx> wrote:
> 
> On Wed, Oct 14, 2015 at 3:13 PM, Mogens Melander <mogens@xxxxxxxxxxxxx>
> wrote:
> 
>> Why is that? What's wrong with extensions?
>> 
>> I, personal, like optional stuff.
>> 
> I agree.
> 
> 
>> 
>> On 2015-10-15 12:07, Lin Yo-An wrote:
>>>> 
>>>> 
>>>> Hi folks,
>>>> 
>>>> I started this project for adding extra array support in extension, if
>>>> you have
>>>> any idea about the missing pieces for array, please let me know.
>>>> Thanks!
>>>> 
>>>> xarray - The missing array functions you are looking for, implemented in
>>>> Extension https://github.com/c9s/xarray
>>>> 
>>>> Cheers,
>>>> Yo-An Lin
>>>> 
>>> A few comments on this project...
> 
> array_pluck is in the language, called array_column
> array_remove is just array_filter, why do I need another function for that?
> array_add - why do I need the overhead of a function call, when I can do $a[
> *key*] = *value*
> array_build - this seems neat, but I think it needs a better example, I can
> do the example already with array_combine(array_column(), array_column())
> array_each - this is just a foreach with an isolated scope and function
> overhead on every iteration, why would I want that?
> array_keys_join - while I like this, why doesn't it have the same argument
> order as implode/join (glue, array)?
> 
> array_keys_prefix, array_first, array_is_assoc, array_is_indexed - I like
> these :)
> 
> PS. please respect the guidelines of the mailing list and do not top
> post.[1]
> 
> [1]
> http://git.php.net/?p=php-src.git;a=blob_plain;f=README.MAILINGLIST_RULES;hb=HEAD


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php