Open codenoid opened 1 week ago
@bormanp I see, but is that the only reason to choose v4 as the default of uuid.NewString ?
source: https://x.com/maciejwalkowiak/status/1809164757959938376
UUIDv7 clearly has better performance, better DX as the first part are a timestamp and more future-proof as it's newer version of UUID
It is an unexpected change in behavior. You are free to generate v7 UUIDs but it is not reasonable to request that applications that have been generating v4 UUIDs to start generating v7 UUIDs. The security implications are important as v4 UUIDs are much more difficult to guess than v7 UUIDs. In many applications this is more important. UUIDs are not just for SQL databases.
uuid.Must(uuid.NewV7()).String()
this could have an impact on the security of UUIDs as the number of bits of randomness decreases from 122 to 48. Please provide a strong justification for this request.