4 ms·
It does depend on this yes, but the random seed isn’t part of the public API. An RNG API in std would need to pick an algorithm and make that part of its stabil
by anp 7y ago
It does depend on this yes, but the random seed isn’t part of the public API. An RNG API in std would need to pick an algorithm and make that part of its stability guarantees.
- ChrisSD 7y agoIn this case I'd quibble that it wouldn't need to guarantee a specific algorithm, just a minimal set of properties. If the user can't manually set the seed then they'll be no expectation that it's deterministic or follows any particular algorithm. So the precise implementation can change with versions or even platforms. Javascript's Math.random and Crypto.getRandomValues works this way.
- anp 7y agoId say that in Rust’s case, we’ve already seen several painful examples of Hyrum’s law. http://www.hyrumslaw.com/ http://www.hyrumslaw.com/