I concur. Readability of the actions on a bool map is far better than for 
the struct{} map. The latter would require a custom type to improve 
readability.


On Tuesday, July 26, 2016 at 1:35:01 PM UTC+2, Dave Cheney wrote:

> If saving one byte per entry is important for your application, the latter 
> is your choice. The former has nicer properties that you can use the single 
> value form of map access,
>
> if m[key] { 
>    // found
> }
>
> I'd say the former is the right choice for 97.25% of general use cases. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to