[RFC] Random extension#7453
Conversation
7a4ef6c to
50dd7d7
Compare
e968bba to
d3a8487
Compare
| tests/*/*.php | ||
| tests/*/*.exp | ||
| tests/*/*.log | ||
| tests/*/*.sh |
There was a problem hiding this comment.
This file can be dropped, top-level .gitignore should be enough.
| namespace | ||
| { | ||
|
|
||
| function lcg_value(): float {} |
There was a problem hiding this comment.
Why are these functions being moved? This part of the change doesn't look necessary to me. Does keeping these functions in ext/standard cause any problems?
|
|
||
| function random_int(int $min, int $max): int {} | ||
|
|
||
| final class Random |
There was a problem hiding this comment.
As far as I saw, our namespace policy doesn't have a guideline about this, but in my opinion, it would be better to put this class into the Random namespace.
| namespace Random | ||
| { | ||
|
|
||
| abstract class NumberGenerator |
There was a problem hiding this comment.
What do you think about making NumberGenerator an interface instead, since it doesn't have any behavior? It would be useful IMO, since userland implementations could extend whatever they want.
- I'd put the interface into the
Random\NumberGeneratornamespace.
|
As I got this extensions can't be build as shared? |
|
There's typo at https://wiki.php.net/rfc/rng_extension |
|
Close to restructure this RFC and implementation. |
RFC: https://wiki.php.net/rfc/rng_extension