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
One line in the Go spec says:
A nil map is equivalent to an empty map except that no elements may be added.
That led me to believe that deletion from a nil map should work. But another line in
the spec says:
If the element m[k] does not exist, delete is a no-op. Calling delete with a nil map causes a run-time panic.
While this is clear, it appears to contradict the first statement. Can we improve the
first statement?