Revise uuid API
shirok opened this issue · comments
Shiro Kawai commented
It's more reasonable to adopt make-generator model, e.g. make-uuid7-generator
, which returns a generator of v7 uuids. Cuurrent uuid7
becomes a pre-created generator.
Advantages:
- We can capture the value of
uuid-random-source
when a generator is created, which is the same model asdata.random
andsrfi.194
. - The generator maker can take arguments to customize, e.g. optimize for burst-generation, without locking, etc.
make-uuid1-generator
andmake-uuid6-generator
can take the default node id as well.