Re: RFC [Discussion]: Randomizer Additions
| From: | Go Kudo | Date: | Sat, 05 Nov 2022 15:43:02 +0000 |
| Subject: | Re: RFC [Discussion]: Randomizer Additions | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-118973@lists.php.net to get a copy of this message | ||
2022年11月6日(日) 0:34 Go Kudo <zeriyoshi@gmail..com>:
> 2022年10月14日(金) 4:38 Joshua Rüsweg via internals <internals@lists.php.net>:
>
>> Hi
>>
>> Tim Düsterhus and I have created an RFC to add new methods that solve
>> commonly encountered use cases to \Random\Randomizer. Specifically
>> creating a random string consisting of specific bytes and generating
>> random floating point values.
>>
>> You can find the RFC at:
>>
>> https://wiki.php.net/rfc/randomizer_additions
>>
>> Proof of concept implementation is in:
>>
>> * https://github.com/php/php-src/pull/9664
>> * https://github.com/php/php-src/pull/9679
>>
>> ----
>>
>> Some open questions to start the discussion:
>>
>> * Are you missing other commonly useful operations that are also useful
>> to have in core?
>> * Do you agree with the method names? Within the PR we received comments
>> that "alphabet" might not be an appropriate term.
>> * Shall an option be added to getFloat() that changes the logic to
>> select from [$min, $max] (i.e. allowing the maximum to be returned)? And
>> how should that look like? Boolean parameter? Enum?
>>
>> ----
>>
>> We're looking forward to your feedback.
>>
>> Cheers
>>
>> Joshua Rüsweg
>>
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit: https://www.php.net/unsub.php
>>
>>
> (I made a mistake in replying to your message, so I will reply again here..)
>
> Hi
>
> I have read the RFC. I think the content is generally good and adequately
> compensates for the areas that could not be completed.
>
> I am skeptical only about getFloat(). The use cases are limited and seem
> somewhat excessive. Do you have examples of how this is supported in other
> languages?
>
> Regards
> Go Kudo
>
Sorry, I did not read the updated RFC. The latitude and longitude samples
were very clear and even my limited understanding of floating point numbers
helped me understand why they were necessary.
I am so far in favor of this RFC and positive about both features. I also
agree that as a member of the maintainer I will maintain it properly.
Thank you for your very coherent writing and implementation.
Best Regards
Go Kudo