std.random suggestions

IchorDev zxinsworld at gmail.com
Sun Sep 21 07:31:38 UTC 2025


On Saturday, 20 September 2025 at 19:31:48 UTC, monkyyy wrote:
> On Saturday, 20 September 2025 at 18:42:03 UTC, IchorDev wrote:
>> An integral part of why its design is good is that it uses the 
>> range interface rather than reinventing the wheel.
>
> Using ranges where they dont belong is bad design

Every random number generator implementation that I've seen 
essentially functions like an infinite range:
- `front` gets the current state.
- `popFront` mutates the state, giving us our next random number.
- `empty` is `false`.



More information about the Digitalmars-d mailing list