Date: Thu, 22 Aug 2024 10:53:18 -0700
On Thursday 22 August 2024 09:07:05 GMT-7 René Ferdinand Rivera Morell wrote:
> > Why would it be? Wouldn't it need to guarantee it doesn't return a
> > duplicate? In which case, the UUID implementation will probably be based
> > on a counter.
> A UUID could hash and take into account context like line, source
> file, function, to create more stable keys that a counter can do.
Then you don't want a UUID. Call it something else, like __UNIQUE__.
Also, why does it have to be unique?
> > Why would it be? Wouldn't it need to guarantee it doesn't return a
> > duplicate? In which case, the UUID implementation will probably be based
> > on a counter.
> A UUID could hash and take into account context like line, source
> file, function, to create more stable keys that a counter can do.
Then you don't want a UUID. Call it something else, like __UNIQUE__.
Also, why does it have to be unique?
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel DCAI Platform & System Engineering
Received on 2024-08-22 17:53:21