On Wednesday, 30 August 2017 at 15:06:12 UTC, Jonathan M Davis
wrote:
[...]
Thank you for the detailed response.
ge
itself would have a dynamic array which was a slice of the other, in which
case, the only affect that can be transferred from one to the other would be
the mutation of the elements that they both refer to.
The times when range invalidation comes into play is when it refers to
non-GC-allocated memory
C++ has the issue of iterator invalidation, where certain
operations on a container while iterating on it may invalidate
the iterator, in which case it is no longer safe to use the
iterator.
D has ranges, but presumably the same issue can arise in D. For
instance, if I have a ForwardRange