People complaining about needing dependencies in rust really out here acting like we're struggling with our small std lib.
No, it does not cause me physical pain to `cargo add rand` and I will not think twice.
No, it does not cause me physical pain to `cargo add rand` and I will not think twice.
Comments
And also, for like 90% of the things you use randomness for 10 line xorshift is more than enough. You do not need a Mersenne twister.
My current position is that getrandom in std is good, but I don't think adding a Random trait is particularly good because where do you draw the line.
Generate uniform ints? Fine.
Generate arrays? Ok.
Generate uniform floats? Umm I guess.
Also, if std offers any other random sources beyond getrandom, which source? Is it cryptographically secure? Is it stable? Is it seedable? For testing it needs to be seedable, but if it's seedable is it going to be stable across compiler versions?
All this is to say: more API = more chances to go wrong. Do not rush this just because a vocal minority are unreasonably complaining about dependencies.