www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19138] New: std.uuid.randomUUID should not depend on

https://issues.dlang.org/show_bug.cgi?id=19138

          Issue ID: 19138
           Summary: std.uuid.randomUUID should not depend on
                    std.random.Random being Mt19937
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: n8sh.secondary hotmail.com

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.

--
Aug 03 2018