4 ms·
I think that's part of the philosophy of Rust, though. The crate system should be robust enough that the most common tasks can be handled by whatever becomes t
by 2bitencryption 8y ago
I think that's part of the philosophy of Rust, though. The crate system should be robust enough that the most common tasks can be handled by whatever becomes the community's de-facto standard.
If you need something simpler than the community's choice and don't want a dependency, roll your own. Otherwise, the ecosystem has you covered.
I will admit that I don't understand why Random is its own crate, and not in the standard library, however...
- nicoburns 8y agoLargely because the design wasn't finished in time for the Rust 1.0 release, and they didn't want to commit to the API. This way of doing things has it's advantages though. People are still coming up with new ways of generating random numbers, and in an external library you can release a major version and remove deprecated functionality without breaking anybody's code.
- int_19h 8y agoFor comparison, here's how it worked out with C++, which now suffered through not one, but (if you count the original C standard library) two iterations of random number generation APIs with significant flaws in them. http://www.pcg-random.org/posts/cpp-seeding-surprises.html http://www.pcg-random.org/posts/cpp-seeding-surprises.html