
On 29 March 2010 01:40, Chad Nelson <chad.thecomfychair@gmail.com> wrote:
An unavoidable consequence of having a Not-a-Number value. Fortunately, the check is extremely fast.
But not an unavoidable consequence, since there's nothing that necessitates that XInt allow a NaN value.
Not acceptable. I want it to be easily portable, which means it has to compile even if the machine doesn't support any cryptographically-secure random number generator that the library recognizes. The developer using it can always plug in a generator that gets entropy from something the library doesn't know about, like an Internet site dedicated to that, after all -- they do exist.
If the library is promising something cryptographically-secure, then failing to compile when it can't is the *best* possible response. Quietly doing something else is the worst possible option when it comes to security. If the library can't provide entropy, then it should require that the user provide some before compiling anything that demands entropy.