Mohammed Nafees
I reach for UUIDs constantly. And yet in most languages, there's no standard type for them. You use a string, or a [16]byte, or you add a UUID package and hope it plays nicely with whatever database or HTTP library you're already using.
Postgres recently added UUIDv7
Postgres has had a native uuid column type for a long time. Recently they added native UUIDv7 support too. UUIDv7 is time-ordered, which makes it a better fit for database indexes than random UUIDv4. Having it at the database level, with proper storage and comparisons, is genuinely useful.
There's an open proposal for Go
Issue #62026 proposes adding a native UUID type to the Go standard library. I'd really like to see this happen.
google/uuid works fine, but without a standard type, every library makes its own call. How does it serialize to JSON? How does it scan from a database row? You end up writing the same small glue code in every project. A standard uuid.UUID type would give the ecosystem something to agree on.
It would also be a natural place to land UUIDv7. Go has time.Time as a first-class type. A time-ordered unique identifier feels like a reasonable neighbor.
It's an obvious gap
UUID has been in the RFC since 2005. It's not going away. Having to pull in a third-party package just to generate one feels like something that should have been solved at the language level by now.