3 ms·
> 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 admittedl
by ignoramous 2y 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 https://tailscale.com/blog/netaddr-new-ip-type-for-go
- ayuhito 2y agoThe Tailscale article taught me a lot! Thanks for sharing.