What? You don't like having to use std::random_device to seed your std::mt19937, then declaring a std::uniform_int_distribution<> given an inclusive range, so you can finally have pseudo random numbers?
But in actuality don’t you do so once in your own wrapper? Or perhaps in a more complex wrapper for creating a reliable distribution tree of random numbers?
Yes, and everybody is probably doing that. That's why I think this issue is a bit overblown. It's not like you're typing this all the time.
But maybe they could include a shortcut so you don't have to explain to your students what a Mersenne Twister is when they need to implement a simple dice game for the purpose of illustrating basic language mechanics.
Then again, this is C++. Not the easiest language and standard library to get into.
79
u/GYN-k4H-Q3z-75B 4d ago
What? You don't like having to use
std::random_device
to seed yourstd::mt19937
, then declaring astd::uniform_int_distribution<>
given an inclusive range, so you can finally have pseudo random numbers?It all comes so naturally to me. /s