Why does Go forbid taking the address of (&) map member, yet allows (&) slice element?
There is a major difference between slices and maps: Slices are backed by a backing array and maps are not. If a map grows or shrinks a potential pointer to a map element may become a dangling pointer pointing into nowhere (uninitialised memory). The problem here is not “confusion of the user” but that it … Read more