Hacker News new | past | comments | ask | show | jobs | submit

UUID package coming to Go standard library

https://github.com/golang/go/issues/62026
> UUID versions 1, 2, 3, 4, 5 are already outdated.

Interesting comment, since v4 is the only version that provides the maximal random bits and is recommended for use as a primary key for non-correlated rows in several distributed databases to counter hot-spotting and privacy issues.

Edit: Context links for reference, these recommend UUIDv4:

https://www.cockroachlabs.com/docs/stable/uuid

https://docs.cloud.google.com/spanner/docs/schema-design#uui...

loading story #47287256
loading story #47288597
loading story #47286882
Yeah v4 is the goto, and you only use something else if you have a very specific reason like needing rough ordering
loading story #47286384
loading story #47286903
loading story #47286080
A slow day in Go-news land? :)

It is heathwarming to see such mundane small tech bit making front page of HN when elsewhere is is debated whether programming as profession is dead or more broadly if AI will be enslaving humanity in the next decade. :)

It’s nice to have a break from AI FUD. It reminds me of a time when I could browse HN without getting anxiety immediately, because nowadays you can’t open a comment section without finding a comment about how you ngmi.
Well fortunately you’re here to take what was a discussion completely unrelated to AI and drag it back around to AI again.

If you’re tired of talking about AI, why did you post this?

loading story #47285130
loading story #47285793
loading story #47284817
loading story #47285430
Odd to me that the focus seems to be on the inactivity of Google's package when https://github.com/gofrs/uuid not only conforms to the newer standard but is actively maintained.
loading story #47284595
loading story #47284440
The proposal is 3 years old
loading story #47286622
Based on the conversation, is it actually coming?
It's currently listed as a 'Likely accept' https://github.com/orgs/golang/projects/17/views/1

Generally means it'll be going in unless something new comes up which alters people's thinking.

loading story #47285149
loading story #47290369
Golang lack of support for basic stuff like this is quite annoying.
loading story #47284387
loading story #47284378
loading story #47284409
loading story #47284266
Kotlin also added RFC 9562 (which includes the new UUID versions) support to the standard library in version 2.3 recently. It's a multi platform implementation too so it works on native, wasm, jvm and js. I think it makes a lot of sense to default to that now that the IETF RFC has been out for a few years.

So, it makes sense for Go to introduce support for this as well.

loading story #47286672
loading story #47287501
loading story #47285426
loading story #47287181
loading story #47286208
what a bunch of drama in the comments.
loading story #47284414
loading story #47284405
loading story #47284410
loading story #47284855
loading story #47284710
loading story #47286573
loading story #47287724