Skip to content

Comment on GUIDs Are Not the Only Answerparent

Comments

IDs should really be their own type: string operations don’t really make sense on them. If you use strings, there should probably be a constraint on the acceptable characters and lengths: e.g. only digits, exactly 10 or something like that.

I personally like the idea of using urls using a domain you control + a path that reflects the type of data it’s an ID for.

To be fair, string operations don't usually make much sense in general.

azure does this for resource IDs and its one of the few things i really enjoy about the platform.

AboutSource Built by g1lg1l

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