Re: [PHP-DEV] Re: [VOTE] Random Extension Improvement

2022-07-13 Thread Go Kudo
2022年7月13日(水) 1:10 Tim Düsterhus :

> Hi
>
> On 7/12/22 18:04, Tim Düsterhus wrote:
> > I also think that both '$string' and '$binary' are appropriate parameter
> > names in this case, so particular preference from my side.
>
> Sorry for the follow-up, there's two mistakes in that sentence. It
> should read:
>
> I also think that both '$string' and **'$bytes'** are appropriate
> parameter names in this case, so **no** particular preference from my side.
>
> Best regards
> Tim Düsterhus
>

Hi

I agree with you. I will change the parameter name from `$string` to
`$bytes` as I don't see any problem.

I will try to explain the changes more rigorously in future proposals.
Thank you.

Regards,
Go Kudo


Re: [PHP-DEV] Re: [VOTE] Random Extension Improvement

2022-07-12 Thread Tim Düsterhus

Hi

On 7/12/22 18:04, Tim Düsterhus wrote:

I also think that both '$string' and '$binary' are appropriate parameter
names in this case, so particular preference from my side.


Sorry for the follow-up, there's two mistakes in that sentence. It 
should read:


I also think that both '$string' and **'$bytes'** are appropriate 
parameter names in this case, so **no** particular preference from my side.


Best regards
Tim Düsterhus

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



Re: [PHP-DEV] Re: [VOTE] Random Extension Improvement

2022-07-12 Thread Tim Düsterhus

Hi

On 7/12/22 14:26, Go Kudo wrote:

Currently, the renaming of Randomizer::shuffleString() to
Randomizer::shuffleBytes() seems acceptable.

I forgot to note the change regarding arguments when I submitted this RFC.
With this change, the argument was supposed to be changed from `string
$string` to `string $bytes`.

- https://github.com/php/php-src/pull/8094#discussion_r916630626

Is this change acceptable? Or should I keep `string $string`?


I believe if the method name changes, then the parameter names are also 
open for adjustment. Especially in this case of a single parameter 
method where it is unlikely that named parameters are used by the developer.


I also think that both '$string' and '$binary' are appropriate parameter 
names in this case, so particular preference from my side.


Best regards
Tim Düsterhus

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



Re: [PHP-DEV] Re: [VOTE] Random Extension Improvement

2022-07-12 Thread Guilliam Xavier
> > https://wiki.php.net/rfc/random_extension_improvement
>
> Hi Internals.
>
> Currently, the renaming of Randomizer::shuffleString() to
> Randomizer::shuffleBytes() seems acceptable.
>
> I forgot to note the change regarding arguments when I submitted this RFC.
> With this change, the argument was supposed to be changed from `string
> $string` to `string $bytes`.
>
> - https://github.com/php/php-src/pull/8094#discussion_r916630626

For reference, first was
https://github.com/php/php-src/pull/8094/commits/32e83a71eae67fdd822fd12ded5a8c054024a4da#r916058794

> Is this change acceptable? Or should I keep `string $string`?

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



[PHP-DEV] Re: [VOTE] Random Extension Improvement

2022-07-12 Thread Go Kudo
2022年7月3日(日) 12:00 Go Kudo :

> Hello internals.
>
> Voting began on 2022-07-02 03:00:00 (UTC) and will end on 2022-07-16
> 03:00:00 (UTC).
>
> https://wiki.php.net/rfc/random_extension_improvement
>
> Best Regards,
> Go Kudo
>

Hi Internals.

Currently, the renaming of Randomizer::shuffleString() to
Randomizer::shuffleBytes() seems acceptable.

I forgot to note the change regarding arguments when I submitted this RFC.
With this change, the argument was supposed to be changed from `string
$string` to `string $bytes`.

- https://github.com/php/php-src/pull/8094#discussion_r916630626

Is this change acceptable? Or should I keep `string $string`?

Regards,
Go Kudo


[PHP-DEV] Re: [VOTE] Random Extension Improvement

2022-07-05 Thread Go Kudo
2022年7月3日(日) 12:00 Go Kudo :

> Hello internals.
>
> Voting began on 2022-07-02 03:00:00 (UTC) and will end on 2022-07-16
> 03:00:00 (UTC).
>
> https://wiki.php.net/rfc/random_extension_improvement
>
> Best Regards,
> Go Kudo
>

Hi.

Once again, I apologize for the delay in starting the voting due to various
reasons.

One point, the RFC Status was still Under Discussion, which has been
corrected. No other changes have been made to the text.

I will be able to resume work today and will continue implementation and
refactoring with PHP 8.2 in mind.

P.S.
> Add Randomizer::pickArrayKeys(array $array, int $num): array method
This seems to be relatively unpopular, and I would like to know the reasons
for those who voted No. Is it because this function, like array_rand, is
overly complex in its behavior?

Regards,
Go Kudo