cisco / ChezScheme

Chez Scheme
Apache License 2.0
6.95k stars 982 forks source link

question about UUID collision and ChezScheme correctness #689

Open symingz opened 1 year ago

symingz commented 1 year ago

Hello, I noticed that ChezScheme made use of UUID extensively internally. I'm curious to know, is it possible (however low the probability) for ChezScheme to malfunction in the event of an UUID collision?

mnieper commented 10 months ago

The probability is much lower than another Cretaceous–Paleogene extinction event, but mathematically it is non-zero. If a collision happens, Chez Scheme can malfunction; for example, generate-temporaries guarantees fresh identifiers each time and macros using this form rely on this fact, e.g. here: https://github.com/cisco/ChezScheme/blob/dde71a01b060368355ac240f5ae9951b38278d6a/s/syntax.ss#L8318

Fortunately, we won't live long enough to observe such a collision and malfunction.