How tf have there been 4 whole versions of the UUID specification

@sir There are 5 different kinds (called "versions") of UUID which serve different purposes; it's not that there's something wrong with UUIDv1 so they had to make UUIDv2.

UUIDv4 makes a lot of sense for a lot of use cases, but when naming machines, maybe the datetime+MAC version makes more sense. In other cases, a namespace + local name probably makes sense (e.g each server can generate incrementing IDs, but they don't communicate so each server has a namespace).

Follow

@mort
Random is the ideal... all others lead to privacy issues.
The best UUID generator will randomly choose which version of UUID it will generate.
@sir

@zachdecook Not necessarily. Sometimes, the only important part is that the IDs are universally unique, and privacy isn't a factor. It just depends on what you're using universally unique IDs for.

i agree that random UUIDs are usually the right choice though, so it makes sense that UUIDv4 is the most popular version. But there are cases where you would want to be able to deterministically recreate a UUID, or cases where you don't have a good entropy source, or privacy/secrecy isn't a factor.

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml