Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoding/gob: nil map vs. empty maps in gobs #2082

Closed
robpike opened this issue Jul 19, 2011 · 2 comments
Closed

encoding/gob: nil map vs. empty maps in gobs #2082

robpike opened this issue Jul 19, 2011 · 2 comments
Assignees

Comments

@robpike
Copy link
Contributor

@robpike robpike commented Jul 19, 2011

Gob won't transmit an empty map, but perhaps it should - an empty map is not a nil map. 
The consequence is that the receiver doesn't know the map hasn't been allocated and
might fail.
@rsc
Copy link
Contributor

@rsc rsc commented Jul 19, 2011

Comment 1:

the language - but not the implementations yet - defines
a nil map to be readable just like an empty map.
i don't know how that affects the discussion here.
@robpike
Copy link
Contributor Author

@robpike robpike commented Jul 21, 2011

Comment 2:

This issue was closed by revision d11c0f1.

Status changed to Fixed.

@robpike robpike added fixed labels Jul 21, 2011
@robpike robpike self-assigned this Jul 21, 2011
@mikioh mikioh changed the title nil map vs. empty maps in gobs encoding/gob: nil map vs. empty maps in gobs Feb 26, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.