Re:GUIDs Are Not the Only Answer
by fiddlerwoaroof on Wednesday January 06, 2021 @11:13PM
(#25667206)
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.
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.