Re: [PHP-DEV] [VOTE] Add array_group function

2021-12-22 Thread Jordan LeDoux
On Wed, Dec 22, 2021 at 1:39 AM Hassan Ahmed <7sno...@gmail.com> wrote:

> Hello Levi, maybe, I just was confused while I was rewriting it. any tips
> would be appreciated.
>

There's a lot of information about this that is missing from the RFC. It
says it "will be overwritten". Does that mean that it does a right union?
What exactly is the meaning of null for the parameters? That isn't covered.

The language on how it handles key conflicts is confusing. It says that it
"currently" handles it by "overwriting", but doesn't explain what that
means. It also doesn't *currently* do that, since it isn't currently part
of the language. You have to scroll down to the example to decipher that
"overwrite" means it takes the last value.

It says there's no backwards incompatible breaks, but that isn't strictly
true, as the `array_group()` function in the global namespace will now be
occupied. That *might* be a rather small BC break, but I'm not sure.

I think you are seeing no votes mostly because the RFC itself is simply
incomplete. It doesn't describe the use case, it doesn't describe the
implementation at all, and it doesn't describe the edge cases at all. I
think it could be an idea that people might support, but you probably need
to find someone who has done an RFC before to help you workshop it a bit.
These are all fixable problems in the RFC document, it could be that the
implementation and the idea are well received.

Jordan


Re: [PHP-DEV] [VOTE] Add array_group function

2021-12-22 Thread Hassan Ahmed
Hello Levi, maybe, I just was confused while I was rewriting it. any tips
would be appreciated.

On Tue, Dec 21, 2021 at 5:58 PM Levi Morrison 
wrote:

> On Tue, Dec 21, 2021 at 1:48 AM Hassan Ahmed <7sno...@gmail.com> wrote:
> >
> > Hello all,
> >
> > I would like to start a voting phase for this RFC: Add array_group
> function
> > 
> >
> > Regards,
> >
> > ~Hassan
>
> This RFC has mistakes in its opening Discussion section as well as
> unnecessarily opinionated language in the introduction, which makes me
> doubt that it is ready for voting. Did anyone specifically review the
> RFC text for you?
>


Re: [PHP-DEV] [VOTE] Add array_group function

2021-12-21 Thread Levi Morrison via internals
On Tue, Dec 21, 2021 at 1:48 AM Hassan Ahmed <7sno...@gmail.com> wrote:
>
> Hello all,
>
> I would like to start a voting phase for this RFC: Add array_group function
> 
>
> Regards,
>
> ~Hassan

This RFC has mistakes in its opening Discussion section as well as
unnecessarily opinionated language in the introduction, which makes me
doubt that it is ready for voting. Did anyone specifically review the
RFC text for you?

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php



Re: [PHP-DEV] [VOTE] Add array_group function

2021-12-21 Thread Hassan Ahmed
Hello Michał, thanks for your kind feedback.

IMHO most of the array_* related functions can be achieved by a simple
loop. and that's why it is a standard lib. it's your opinion after all and
I really appreciate it.

Thanks a lot.
Regards,
~Hassan

On Tue, Dec 21, 2021 at 11:43 AM Michał Marcin Brzuchalski <
michal.brzuchal...@gmail.com> wrote:

> Hello Hassan,
>
> wt., 21 gru 2021 o 09:48 Hassan Ahmed <7sno...@gmail.com> napisał(a):
>
>> Hello all,
>>
>> I would like to start a voting phase for this RFC: Add array_group
>> function
>> 
>>
>>
> I voted "no" because I don't like populating standard library with small
> functions of rare use
> which are easily replaceable by a simple set of statements and/or
> expressions.
>
> Best regards,
> Michał Marcin Brzuchalski
>


Re: [PHP-DEV] [VOTE] Add array_group function

2021-12-21 Thread Michał Marcin Brzuchalski
Hello Hassan,

wt., 21 gru 2021 o 09:48 Hassan Ahmed <7sno...@gmail.com> napisał(a):

> Hello all,
>
> I would like to start a voting phase for this RFC: Add array_group function
> 
>
>
I voted "no" because I don't like populating standard library with small
functions of rare use
which are easily replaceable by a simple set of statements and/or
expressions.

Best regards,
Michał Marcin Brzuchalski


[PHP-DEV] [VOTE] Add array_group function

2021-12-21 Thread Hassan Ahmed
Hello all,

I would like to start a voting phase for this RFC: Add array_group function


Regards,

~Hassan