Hacker News new | ask | show | jobs
by a-nom-a-ly 4046 days ago
You seem to be confusing `array` with `slice`. AFAIK, append always returns a new slice. How could it not, when everything is copy/pass by value? A slice is essentially a struct with fields for len, cap and a pointer to an array.