shirok / Gauche

Scheme Scripting Engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Revise uuid API

shirok opened this issue · comments

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 as data.random and srfi.194.
  • The generator maker can take arguments to customize, e.g. optimize for burst-generation, without locking, etc. make-uuid1-generator and make-uuid6-generator can take the default node id as well.