On Saturday, 24 October 2015 at 13:18:26 UTC, Shriramana Sharma
wrote:
Hello. I had first expected that dynamic arrays (slices) would
provide a `.clear()` method but they don't seem to. Obviously I
can always effectively clear an array by assigning an empty
array to it, but this has unwanted consequences that `[]`
actually seems to allocate a new dynamic array and any other
identifiers initially pointing to the same array will still
show the old contents and thus it would no longer test true for
`is` with this array. See the following code:
[...]
use std.container.array