3 ms·
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. Instea
by superbaconman 13y ago
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.