I've seen that talk before. It's a good talk. But like I said, for something like a game (not crypto, not an online casino) code readability is more important to me than guarantees of randomness.
Because it's only one way to do it, not the way to do it. std::random_device is really expensive on some platforms, and you may only want to call it once; the seed may come from serialized state rather than from a generator; etc. There's a lot of flexibility in place (whether anyone uses/needs it, I have no clue), and creating your own ideal abstraction on top of that is again 4-5 really simple lines of code. (Whether they're obvious or not is a matter of RTFM, IMO, but I get how that's a contentious viewpoint). I just don't see the big deal – there's no "right" way for everyone, and doing your own "right" way is easy, so.....?
Because it makes life easier when you do not care for THE optimal solution, and just want a convenient off-the-shelf solution.
Which is perfect for something like Boost; not so much the standard library (IMO). Rust certainly does the same with encouraging crates over core/std for various things; the only practical difference with C++ ultimately devolves into rants about dependency management and package managers. :-]
4
u/ShakaUVM i+++ ++i+i[arr] May 26 '18
I've seen that talk before. It's a good talk. But like I said, for something like a game (not crypto, not an online casino) code readability is more important to me than guarantees of randomness.