[Issue 24591] New: [std.random] docs bad at communicating trivail usecase

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jun 8 16:16:10 UTC 2024


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

          Issue ID: 24591
           Summary: [std.random] docs bad at communicating trivail usecase
           Product: D
           Version: D2
          Hardware: All
               URL: http://dlang.org/phobos/
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: crazymonkyyy at gmail.com

https://forum.dlang.org/post/etyigamzkmvinpooeryw@forum.dlang.org

https://dlang.org/phobos/std_random.html#.uniform

uniform's docs code communicates using a verbose seed; this is wildly
unnecessary for 95% of cases(and if someones doing cyptro they should read and
understand the whole lib)

pathologically simple code such as:

```d
import std;
void main(){
    uniform(0,100).writeln;
}
```

should be front and center

--


More information about the Digitalmars-d-bugs mailing list