bool alias for uint8
float32 == float (in C lang)
float64 == double (in C lang)
uint, int, uintptr --bit count decided by cpu and compiler
Array types is always transfered by value, not reference, copy the all elements of array
Slice types will be transfered by reference, not value, like alias, don’t copy, many slices may point to the same array which they are underlying, when the cap(slice) change, you should get the new slice from the new underlying array, and the old slices still point to the old array, not the new array. The old slices is invalid for using. So getting the new slice first when you change the cap(slice).
相关文章: