Bug 19138 – std.uuid.randomUUID should not depend on std.random.Random being Mt19937
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-08-03T15:18:18Z
Last change time
2018-08-13T18:18:08Z
Assigned to
No Owner
Creator
Nathan S.
Comments
Comment #0 by n8sh.secondary — 2018-08-03T15:18:18Z
Right now `std.uuid` has a static assert that `std.random.Random` is `Mt19937`. This is contrary to the public documentation of `std.random.Random`:
---
The "default", "favorite", "suggested" random number generator type on
the current platform. It is an alias for one of the previously-defined
generators. You may want to use it if (1) you need to generate some
nice random numbers, and (2) you don't care for the minutiae of the
method being used.
---
Depending on implementation details of another module is brittle and may lead others to believe they can make the same assumption if even other Phobos modules assumes it.
Comment #1 by n8sh.secondary — 2018-08-03T16:17:25Z