But then you pay the penalty for the copy. I've been told offline that the GC does do what I'm suggesting; if that's correct then perhaps the essay needs revised...
Thomas
Is there any thought to changing the GC algorithm to deal with this case? It would not require the allocate-and-copy version of slicing; simply the GC would need to keep track of internal pointers to sliced arrays, and release the front portion of arrays when it can no longer be reached by live slices.
Also, one could possibly copy to the front the contents of a re-sliced slice that is appended to, without re-allocation, if there is enough unused space in the underlying array?