An empty struct is idiomatic and expected to be used in a Set type. When/if the memory optimization is reintroduced, no code change will be needed to take advantage of it.
Using a bool instead of empty struct also means that there is more way to use it wrong: check the bool instead of if the key exist, set the bool incorrectly, etc...
I would argue using bool hurts readability more.
Even better write/use a simple library that calls things that are sets `Set`.
Almost made it into 1.18 but looks like it doesn't add enough value and has some open questions like what to use for a backing data type and what complexity promises to make.
I also feel like map[T]struct{} communicates its purpose way better than map[T]bool. When I see a bool I expect it to represent a bit of information, I don't see why using it as a placeholder for "nothing" would be more readable than a type that can literally store nothing.
What if.. the management made a request to make the game take more space than the previous release?
So everyone could see just how much content there is and how much better everything is.
I mean, the developers cannot be that incompetent while being able to ship a high quality product.
Quantum computing does not exist. The industry with it's 30 year history since Shor algorithm boasts its crown achievement of factoring the mind-blowing N=35 and creatively inflated qubit counts.
If it could exist during our lifetime, assuming the capture and storage of encrypted message streams is trivial to well resourced threat actors (nation states), if the cost is reasonable to implement quantum mitigations it is reasonable and prudent from a risk management perspective to do so.
The worst case scenario is nation states consuming and storing these encrypted message streams, and suddenly achieving the ability to rapidly decrypt everything previously captured and stored a la "No more secrets."
Hx is batteries included. Nvim requires installing lots of plugins that do not inspire confidence - descriptions ridden with emojis, impossible to know who maintains what. Too many vectors leading to possible compromise.
> but goroutine B (the goroutineB function) apparently never ran at all.
Untrue. Up the iterations to 1000, you'll get your interleaving. Since 1.14, goroutines are async preemptible (async safe points), and will not block the scheduler.
Also, time.Sleep bad, use runtime.Gosched().
An empty struct is idiomatic and expected to be used in a Set type. When/if the memory optimization is reintroduced, no code change will be needed to take advantage of it.
reply