| ▲ | azinman2 4 hours ago | |||||||
It’s kind of ridiculous to argue against UUID being part of the standard package for a language largely aimed at servers. At that point why even have any crypto functions or any of the bigger stuff it already has if the argument is 3rd party libs are enough? | ||||||||
| ▲ | tptacek 4 hours ago | parent | next [-] | |||||||
UUIDv7 didn't mature until long after the Go standard library was mostly settled. By that point, there was already an idiomatic 3p dep for UUIDs (the Google package), and as you can see from the thread, there were arguments in favor of keeping it 3p (it can be updated on an arbitrary cadence, unlike the stdlib). | ||||||||
| ||||||||
| ▲ | hrmtst93837 2 hours ago | parent | prev | next [-] | |||||||
Adding UUID to the standard library is defensible for a server-focused language, but making it part of the stdlib binds maintainers to long-term compatibility and support, so the debate should focus on API surface and long term maintenance rather than whether third-party packages exist. If added, keep the scope small: implement RFC 4122 v4 generation using crypto/rand.Read with correct version and variant bit handling, provide Parse and String, MarshalText and UnmarshalText, JSON Marshal and Unmarshal hooks, and database/sql Scanner and Valuer, and skip v1 MAC and time based generation by default because of privacy and cross-platform headaches. | ||||||||
| ▲ | vips7L 3 hours ago | parent | prev [-] | |||||||
People are weird. A few days ago someone on /r/Java was arguing that a basic JSON parser shouldn’t be in the standard library. | ||||||||