Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Interesting to see that OpenBSD recently went the other way: break the standard and make rand() a good random generator by default. Even to the point of making srand(time(0)) a no-op.

https://news.ycombinator.com/item?id=8719593



That's part of exactly what makes the problems with rand() so intractable. Whether a program performs as specified is an arbitrary function of real world state.


It's good that they did that, as a safety net for old code, but none of the standards which define rand() guarantee or even suggest uniform randomness, so the bell has still certainly tolled.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: