Benjamin Terrier:
>> However, my knowledge is that whatever the method one use to generate
>> your UUID, one can never guarantee its uniqueness. Meaning that the
>> Qt documentation is falsely guarantying unique UUID and therefore
>> should be changed.
>>
>> If anyone can confirm, I'll create a bug report.

Thiago Macieira
> Right, it's not guaranteed. It's just that the chance of collision is
> virtually zero.

... and for sufficiently small values of "virtually zero", that's as
close a guarantee as you'll get to anything, because no matter how well
you think you can guarantee things, cosmic rays still sporadically flip
bits in your memory.

I read a most illuminating paper a few years back that looked at the
reliability of tests of prime-ness for large numbers.  There's a widely
used approach that's cheap and theoretically not guaranteed but easy to
apply to enough test-cases to reduce the likelihood of error to
ignorably low.  This was compared to the best known "provably correct"
algorithm for determining primeness - which is significantly more
computationally expensive.  Due to the (ridiculously rare) flipping of
bits by cosmic rays hitting the processor and memory, the latter was in
fact *less* reliable than the former, because the former ran faster so
incurred a smaller chance of errors due to stray rays.

I don't think we should worry about documenting how not-quite-perfect
our guarantee of UID uniqueness is in a case where - realistically -
the difference from perfection is ignorable.

        Eddy.
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to