← Back to context

Comment by lokedhs

7 years ago

But there can be collisions, at least in theory. And as we can see, in practice too.

Not checking for collisions because you trust that an RNG returns unique values is a fallacy and should be avoided. Especially since it's so easy to deal with the problem.

It would be better to report the collision because most likely it means some error.

  • Yes, of course. As long as you do something. Just ignoring it because it's assumed it'll never happen is just bad design.