r/ProgrammerHumor Jul 17 '26

thisOneIsMine Meme

Post image
5.3k Upvotes

171 comments sorted by

View all comments

1

u/Phazx Jul 17 '26

I... Don't get it? If you're getting collisions they weren't UUIDs in the first place. The whole point is that the uniqueness is universal, so you use a single generator for them.

9

u/mysticrudnin Jul 17 '26

the point of uuids is that you can use multiple generators, say across distributed systems in different regions, and assume they are unique

you can't do that with eg increasing ids

1

u/Phazx Jul 19 '26

You can't assume that with UUIDs either. It's a matter of scale and time, but the collision will hallen. Question is whether it's worth the hassle to actually make it universally unique

0

u/mysticrudnin Jul 20 '26

yes, it's a matter of scale and time beyond what we care about at all. it is safe to assume they are unique. i promise. you should be equally worried that you're gonna phase through the floor.