Go generally ensures that zero values are useful.

So a zero slice allows us to append to it, without having to do any special 
initialization.

This approach also extends to the standard library.

sync.Mutexs are unlocked and usable in the zero state.

Even zero sync.Maps ready for use.

So why are maps different? Why is it necessary to make a map, before it can 
be assigned to?
Is there any use case where a zero map which can not be assigned to is 
useful?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/14e25f79-8fab-4cec-8c00-fedd26488014n%40googlegroups.com.

Reply via email to