Skip to content

Comment on GUIDs Are Not the Only Answerparent

Comments

The best answer is the humble integer. (...)

...and then you proceed by suggesting ID code generation methods that replicate UUIDs.

It sounds like you are trying to criticize UUIDs while being totally unaware of what UUIDs are.

I mean, UUIDs are nothing more than integers that are generated following one of half a dozen different methods so that they can be probably unique without relying on a central authority.

One of the UUID versions is a pure random number. Another is a MAC address concatenated with a timestamp complemented with a local counter. There are literally two UUID methods that consist of hashing data.

Your supposed solutions to the alleged problem posed by UUIDs is a reinvention of what UUIDs have always been. But UUIDs have been though through and are standard and ubiquitous.

The size requirement of integers grows with the number of records. Uuid's tend to be a fixed size.

IMO that's a big advantage for integers that uuid's will never be able to overcome. Key size matters when you are dealing with heavily indexed data.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.