the.bay.news

Why doesn't Zig have std.HashSet?

Ziggit
Why doesn't Zig have std.HashSet?
We can use std.HashMap with the Key=<your set element type> and Value=void, but seems hacky: the API isn’t as good as it could be e.g. you have to treat keys as your values and disregard a big part of the API. This issue exists, but was closed without comment. Does anyone know why std does not / cannot have HashSet? Wondering if there’s a good reason I’m not seeing

We can use std.HashMap with the Key=<your set element type> and Value=void, but seems hacky: the API isn’t as good as it could be e.g. you have to treat keys as your values and…

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.