-
-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
rand_pcg has zero usage examples #1347
Comments
So you'd like documentation to link explicitly to those RNG traits and include a small example? Sure, please do. The reason |
I guess that is a common problem in Rust, where functionality is often "hidden" in traits. I think a "quick start" example would help with this. |
Wait, this is about doc links not just examples... |
@vks could you attach a little more doc to the RNGs in your examples PRs please? Something like this:
|
The crate page for rand_pcg has no code examples. It links to documentation, but it's a documentation of implementation details of the algorithm, rather than how to actually use any of this crate's functionality. As far as I can tell, there is not a single piece of code demonstrating generating a random number anywhere in the crate's docs.
Everything about this crate assumes the user is already familiar with the
rand
crate. However, fromrand
's docs it's not obvious how to use the other algorithms with it either. The Additional generators section just lists them, but has no code examples, and it just links back to code-less docs ofrand_pcg
and others, which feels like a catch 22.The key to this puzzle is very hard to spot. Everything user needs to know is folded hidden, and sandwiched between implementations of irrelevant traits, camouflaged to look like boilerplate lists:
The text was updated successfully, but these errors were encountered: