contiguous ranges
deadalnix via Digitalmars-d
digitalmars-d at puremagic.com
Fri Feb 20 15:32:28 PST 2015
On Friday, 20 February 2015 at 19:54:20 UTC, Andrei Alexandrescu
wrote:
> On 2/20/15 11:09 AM, deadalnix wrote:
>> On Friday, 20 February 2015 at 12:23:49 UTC, Vlad Levenfeld
>> wrote:
>>> Yes. A slice is the simplest realization of a contiguous
>>> range. I
>>> argue that it is useful to have structures which have
>>> slice-like
>>> behavior without actually being slices.
>>>
>>
>> I'm still not sure what more complex continuous range exists,
>> and if it
>> is worth the complexity of adding them to the language.
>
> Reference counted slices would be the only one coming to mind.
>
> There are several other ranges with contiguous _support_:
> retro, randomCover, map (over ranges with that property), and
> probably more.
>
>
> Andrei
The RCSlice I can buy it, but map is certainly not contiguous.
If an RCSlice can decay to a borrowed slice, then even this one
goes away.
More information about the Digitalmars-d
mailing list