Open JeffreyBenjaminBrown opened 4 years ago
In case you want sortability, you'll probably want something like this to generate the UUIDs:
https://docs.microsoft.com/en-us/sql/t-sql/functions/newsequentialid-transact-sql
The byte shuffling & reason for it gets explained here:
Using a UUID instead of an
Int
for theAddr
type synonym would be better, as they are less prone to collision[1].There are some conditions under which a user needs to actually know the address of an expression -- when deleting an
Expr
, for example. IfAddr
was a UUID, that would become awkward. A solution would be for the UI to define temporary low-digit synonyms for eachAddr
.Footnote 1
(If a billion people each had a billion 128-bit UUIDs, the probability that any two UUIDs would be the same is about 0.15%:
See the approximations section of the Wikipedia article on the birthday problem for where that formula comes from.)