news.volyx.in

UUID package coming to Go standard library (github.com)

375 points by soypat · 178 days ago · 245 comments on HN

Article summary

A proposal to add a UUID package to the Go standard library has been accepted. The proposal aims to provide a standard way to generate and parse UUIDs in Go programs. The decision was made after considering the widespread use of a third-party UUID package and the need for a maintained and secure implementation. The new package will provide support for generating and manipulating UUIDs, including versions 3, 4, and 5.

Main themes

  • UUID package
  • Go standard library
  • Language design
  • Package maintenance
  • Security

What commenters say

  • The Go standard library is lacking in certain basic packages, such as UUID, which is a common requirement in many applications.
  • The decision to add a UUID package to the standard library is a good one, as it will provide a maintained and secure implementation.
  • Other languages, such as C#, Java, and Python, have UUID support in their standard libraries, making Go an exception.
  • The size and scope of a standard library is a matter of debate, with some arguing that a larger library is better and others preferring a smaller, more focused library.
  • The quality of the standard library is not the only factor in determining a language's usability, as third-party libraries can often fill gaps in functionality.
  • Maintaining a large standard library is a significant undertaking, and language teams must balance the need for new features with the need for stability and security.
  • The presence of a UUID package in the standard library does not necessarily mean that it will be used in all cases, as some developers may prefer third-party libraries for specific use cases.
  • The Go language team's approach to package management and the standard library is a strength, allowing for a balance between stability and flexibility.