Hacker News new | ask | show | jobs
by 9rx 196 days ago
I don't see the difficulty here. The slice is to be thought of as value type, as demonstrated in the C version. Just like in C, you can return it from a function without the heap because it is copied.