I think the last gotcha there is the wrong way to think about it. If you say slices are passed by reference you risk passing on a lot of mis-information. Instead, slices are a struct, with a pointer to an array, and are passed by value. I mean you can't explain the append behavior without knowing what a slice really is.
1 comment
[ 0.64 ms ] story [ 59.0 ms ] thread