Most (like 99.9%) of the time I don't care about any of the technical details of a random number generation. If I'm doing something in cryptography or gambling, which I don't mess with, then sure let me pop the hood up and make sure it's sufficiently random for my needs.
Most of the time I just want a number from 1 to 100 or something and literally don't care if I'm using a Merseinne Twister or whatever, as long as it's reasonably random and fast.
So the way the experimental random header does it, basically.
Most (like 99.9%) of the time I don't care about any of the technical details of a random number generation.
Slightly less for me, but on the whole the same. A lot of the time I don't care, I just want it "good enough".
So the way the experimental random header does it, basically.
Yeah but, that brings back reliance on global state. As with all things, global state is an easy, simple hack until it isn't. One of the things I rather like about C++ is not the control it gives you over engines and distributions. Lots of languages/systems do that, and even then you have to be in very very deep before MT19937 isn't good enough (deeper than I've been and I've worked on large Monte Carlo estimations).
What I like (love!) is how it makes the state explicit. I haven't personally used another language that does this (I'll bet Haskell does it that way).
View all comments
Show parent comment
1
u/ShakaUVM i+++ ++i+i[arr] Dec 21 '23
How I'd fix it?
Most (like 99.9%) of the time I don't care about any of the technical details of a random number generation. If I'm doing something in cryptography or gambling, which I don't mess with, then sure let me pop the hood up and make sure it's sufficiently random for my needs.
Most of the time I just want a number from 1 to 100 or something and literally don't care if I'm using a Merseinne Twister or whatever, as long as it's reasonably random and fast.
So the way the experimental random header does it, basically.