Hacker News new | ask | show | jobs
by ignoramous 473 days ago
> string interning package to its standard library

TFA literally says interning isn't there in Go yet.

  While the unique package is useful, Make is admittedly not quite like Intern for strings, since the Handle[T] is required to keep a string from being deleted from the internal map. This means you need to modify your code to retain handles as well as strings.
> an interesting read

Tailscale's attempt at implementing "unique" was quite... something: https://tailscale.com/blog/netaddr-new-ip-type-for-go

1 comments

The Tailscale article taught me a lot! Thanks for sharing.