HACKER Q&A
📣 illuminant

GUID or UUID?


In a data structure, dou you refer to the instance of a generated UUID value as "uuid" or "guid"?

For some reason my impulse is to call the instance value a guid, even though I just used a uuid function to generate it.


  👤 kstenerud Accepted Answer ✓
It depends on what platform you're working with. Microsoft based platforms tend to refer to the type as "GUID", whereas almost everyone else calls it a "UUID".

I wouldn't name a struct member "uuid" or "guid", however - that's a type, not a name.


👤 metaloha
Mostly I just refer to it as `id`. The only time I'll explicitly use `guid` or `uuid` as a field/property name is if it's semantically important - which is almost never.

👤 bhaney
I call it a UUID. "GUID" is a Microsoft-ism