You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, I've gone back and forth... in real use, I don't think size really matters unless you're making a gigantic set... my main concern is usability, and plain bools are easier to work with than struct{}.
// this is easier and nicerset["foo"] =trueexists:=set["foo"]
// this is more compact, but uglyset["foo"] =struct{}{}
_, exists=set["foo"]
I'll keep this open for now to have other people weigh in on it, but I don't think it really matters either way.... and bool is slightly easier to read IMO.
chasehensel
added a commit
to chasehensel/starlight
that referenced
this issue
Jul 6, 2020
Since the empty struct is more compact.
The text was updated successfully, but these errors were encountered: