Re: Re: [RFC] [Draft] Add Randomizer class (before: Add RNG extension)

From: Date: Mon, 24 May 2021 15:16:44 +0000
Subject: Re: Re: [RFC] [Draft] Add Randomizer class (before: Add RNG extension)
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-114567@lists.php.net to get a copy of this message
Hi Go Kudo, This proposal looks much better. Well done. What would help is if you showed the examples from the introduction section rewritten using the new API. I don't think it makes sense to make parameters (?int $min = PHP_INT_MIN, ?int $max = PHP_INT_MAX) nullable. Regarding the method names, I would be afraid of naming them using PHP keywords. Maybe they should be called getInt and getBytes? Why isn't the new class in a new extension? Is there a reason why it should go into core? Regarding the name, I think Random or Randomizer is fine, but I would avoid acronyms. Regards, Kamil

« previous php.internals (#114567) next »