Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No, nicksardo's understanding was quite correct. Slices are values, and it is impossible to return the same one, because value semantics don't work like that.

The slice returned only points to a new array when the capacity is not large enough to fit additional values.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: