Skip to content

[std.random] docs bad at communicating trivial usecase #10556

@dlangBugzillaToGithub

Description

@dlangBugzillaToGithub

crazymonkyyy reported this on 2024-06-08T16:16:10Z

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

Description

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions