http://wiki.dlang.org/DIP25

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sun Dec 28 13:34:17 PST 2014


On 12/28/2014 1:33 PM, Walter Bright wrote:
> On 12/28/2014 12:04 PM, Peter Alexander wrote:
>> On Sunday, 28 December 2014 at 18:16:04 UTC, Andrei Alexandrescu wrote:
>>> Very little breakage I can think of. Ranges usually don't own their payload.
>>
>> I'm thinking more about higher order ranges, e.g. take, filter, cycle, retro;
>> over a mutable range with ref front. Even if the underlying range (e.g. an
>> array) has the inout, the higher order range will need the inout as well, so
>> that it is propagated, no?
>
> inout is not transitive, so a ref on the container doesn't apply to a ref on the
> contents if there's another level of indirection in there.
>

Also, inout on parameters will be inferred for templates, and most ranges are 
templates.


More information about the Digitalmars-d mailing list