Re: [RFC] Change behaviour of array sort functions to return a copy of the sorted array
| From: | Bilge | Date: | Mon, 21 Oct 2024 20:50:49 +0000 |
| Subject: | Re: [RFC] Change behaviour of array sort functions to return a copy of the sorted array | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-125828@lists.php.net to get a copy of this message | ||
On 21/10/2024 21:41, mickmackusa wrote:
On Tue, 22 Oct 2024, 02:30 Valentin Udaltsov, <udaltsov.valentin@gmail.com> wrote:Regarding the Array\map(iterable $iterable, ...) signature, if new functions are to accept iterables instead of arrays (as they absolutely should) then theWhat if instead of this proposal we reimplement all of the array functions in a different namespace and fix a lot of other problems and inconsistencies?Array\map(iterable $iterable, callable $mapper): array Array\sort(iterable $iterable, int $flags = SORT_REGULAR): array ...-- ValentinGetting off-topic here The whole discussion thread is "off-topic" in the context of the RFC, but I don't consider that a problem; it's a useful discussion to have whether the RFC sparked it or not.
Array namespace makes no sense. But at that point we're basically just putting https://github.com/nikic/iter in core (not that that's a bad thing).
Cheers,
Bilge