Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align version functions #382

Open
hfhbd opened this issue Aug 18, 2024 · 0 comments
Open

Align version functions #382

hfhbd opened this issue Aug 18, 2024 · 0 comments

Comments

@hfhbd
Copy link
Owner

hfhbd commented Aug 18, 2024

Current design:

  • Uuid.Companion.random(): v4, comes from stdlib
  • Uuid.Companion.generateUuid(namespace: Uuid, value: String): v5, aligns with stdlib
  • Uuidv7(timestamp: Long, random: Random), Uuidv7(timestamp: Instant, random: Random): v7, top level "constructor"

What about these top level function emulating a constructor?

Uuidv4(), Uuidv4(random: Random)
Uuidv5(namespace: Uuid, value: String)
Uuidv7(timestamp: Long, random: Random), Uuidv7(timestamp: Instant, random: Random)

This needs to be aligned with the stdlib too, see Kotlin/KEEP#382

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant