On Friday, 13 January 2017 at 05:33:07 UTC, Chris Wright wrote:
On Thu, 12 Jan 2017 20:02:38 -0800, Jonathan M Davis via
I don't see how it possibly could given how dynamic arrays
work in D. It would have to have some sort of reference
counting mechanism, which would likely be a nightmare with
On that topic, D's arrays would play nicer with both
refcounting *and* modern garbage collectors if they were
structured as base, offset, length instead of start, length.
You could put metadata just before the start of the array,
including the reference count.
I know that you mean for the general case, but the structure you
describe is the same as `std.experimental.ndclice`s Slice!(1,T*):
pointer, length, stride triplet. This would also work with higher
dimensional Slices as well.
Combine that with prefix allocator ét voilá.