Pointers vs. references
Some differences between pointers and references can be confusing, especially since there are several different definitions for those words. This can make it difficult to answer simple questions like “Does Golang have reference types?” (TLDR: most people and the official Go FAQ say that Go does have reference types.) Pointers In some languages like C++, pointers can point anywhere in memory. They can point to null, or to memory with data of the pointer’s type, or any other part of memory....