A Refcounted Array Type
monarch_dodra via Digitalmars-d
digitalmars-d at puremagic.com
Thu Mar 5 07:20:45 PST 2015
On Monday, 23 February 2015 at 22:15:54 UTC, Walter Bright wrote:
> E array;
> size_t start, end;
> int* count;
What is the point of keeping start/end? Aren't those baked into
the array slice? Not storing start end means not having to do
index arithmetic (minor), reducing struct size (always nice). But
more importantly, it allows implicit (and conditional) bounds
checking (awesome), which actually runs regardless anyways.
Or did I miss something?
More information about the Digitalmars-d