4 ms·
IMHO saying they are is misleading as this article correctly points out nothing is, and Rob Pike himself has pointed out the same on many occasions. They are re
by Rapzid 10y ago
IMHO saying they are is misleading as this article correctly points out nothing is, and Rob Pike himself has pointed out the same on many occasions. They are referred to as "reference types" because they contain pointers to the underlying data structure. However the thing stored in the variable is more than just a pointer, and it is passed by value.
Knowing the difference can have important ramifications; particularly in the case of a slice which has its header copied when passed to a function.