Hi Sergii,

First of all, let me say that I am glad more people are willing to give
back to the PHP language. I'm happy you decided to join the ML.

However, the change you are proposing is unlikely to be well-received. PHP
already has too many functions. It is known as a kitchen sink[1].
I don't think we need list-variants of the array functions. As you noted
yourself, it can be simply implemented with array_values(). If we do this
one then next someone will say what about array_diff() with a list?
Most of the functionality can be implemented in userland and it's usually
the preferred way. If we are going to add a new function to PHP, it must
have a very good reason to be implemented in C. array_is_list() had a very
good explanation: performance.
Ideally, we would have a separate type for List, but... it can easily be
implemented in userland so we are back to square one. While PHP's arrays
are something of a Frankenstein's monster, they work well as an internal
implementation detail of other data structures.
Adding more array_* functions is something that many of us would want to
avoid.

Regards,
Kamil

 [1]:
https://web.archive.org/web/20181107125816/http://www.mcguirehimself.com/?p=117

Reply via email to