Hacker News new | ask | show | jobs
by _nhynes 1414 days ago
Rust `Set<T>` is implemented as `Map<T, ()>`. Go is similar, but you have to do it manually. Zero-sized types mainly have use in generics (so yes-ish by templates, but not accidental).
1 comments

Still, why would you ever have multiple, if there’s no way to discriminate between them because you can’t mutate them or obtain their address?