Orphan ranges

Walter Bright newshound2 at digitalmars.com
Sun Apr 15 11:43:13 PDT 2012


On 4/15/2012 9:34 AM, Andrei Alexandrescu wrote:
> Built-in arrays work routinely like that, and in fact the originating arrays are
> not distinguished by type in any way from their ranges (be they orphan or not).
> The question is, what should std.container do about orphan ranges in general?
> Should it allow them, disallow them, or leave the decision open (e.g. to be made
> by the allocator)? Depending on what way we go, the low-level design would be
> quite different.

I suspect that disallowing them would be surprising behavior, as D with array 
slices supports it well.



More information about the Digitalmars-d mailing list