3 ms·
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 templat
by _nhynes 4y 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).
- Someone 4y agoStill, 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?