Re: [RFC] Namespaced in bundled extensions

From: Date: Fri, 26 Feb 2021 11:24:18 +0000
Subject: Re: [RFC] Namespaced in bundled extensions
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-113283@lists.php.net to get a copy of this message
On Fri, Feb 26, 2021 at 12:18 PM Benjamin Morel <benjamin.morel@gmail.com>
wrote:

> Thank you for this RFC, Nikita. This is a necessary first step in the right
> direction.
>
> Even though this is out of scope for this RFC, I hope that moving standard
> functions to namespaces will be an opportunity to fix inconsistencies in
> parameter order, like:
>
> array_map($callback, array)
> array_filter($array, $callback)
>
> and not just an alias under a namespace!
>

Maybe off-topic, but I don't think you could "fix" them:
for array_map, the array is variadic-like, so must be last;
for array_filter, the callback is optional, so must be after the array.
(Correct me if I'm wrong.)

-- 
Guilliam Xavier


Thread (19 messages)

« previous php.internals (#113283) next »