3 ms·
This had appeared a few times before at earlier stages of the draft process... https://news.ycombinator.com/item?id=28088213 https://news.ycombinator.com/item?
by stevesimmons 4y ago
This had appeared a few times before at earlier stages of the draft process...
https://news.ycombinator.com/item?id=28088213 https://news.ycombinator.com/item?id=28088213 [244 comments]
Personally, I really like UUIDv7, except I transform the UUID to a 25-character string which has all the same properties except it doesn't look like a UUID. The last thing I want is my index of time-sortable UUIDs getting contaminated with with some UUIDv4 fully random ones. Since UUIDs may be generated and persisted in a distributed manner, it's a simple way to at least spot this.
- ikornaselur 4y agoThe UUID version is in the actual ID, so you would be able to spot the version as it isn't fully random. Although you light mean just visually you'd spot the difference much easier!
- theptip 4y agoCan’t you just check the “version” bits and reject if it’s not 4/7? Or are you worried about someone generating a completely random (non-compliant) set of bits that happens to parse as a v4/7