Dynamic array and slices (need Walter and Andrei decision)

Steven Schveighoffer schveiguy at yahoo.com
Thu May 30 13:28:53 PDT 2013


On Thu, 30 May 2013 16:19:01 -0400, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:


> T[] is both. You can use it to take a slice of any piece of memory,  
> including freshly GC-allocated arrays. But when you try e.g. to append  
> to it with ~=, that only works if the slice originated as a GC-allocated  
> array.

This isn't *precisely* true.  ~= works on a slice of a non-GC array.  It  
just turns it into a GC-array-backed slice.

-Steve


More information about the Digitalmars-d mailing list