More range woes: std.array.save is invalid

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Dec 20 10:47:16 PST 2012


On 12/20/12 12:48 PM, Jonathan M Davis wrote:
> On Thursday, December 20, 2012 08:03:04 H. S. Teoh wrote:
>> Because the definition of .save only requires that the state of the
>> outer range is saved. Nothing is guaranteed about the state of the inner
>> ranges.
>
> That just means that that anything involving ranges of ranges needs to be
> written with the understanding that saving the outer range doesn't save the
> inner ones. So, we may have bugs with regards to this (similar to how we have
> bugs related to not calling save when we should), but there's still no problem
> with save itself - only with how it's used.
>
> So much of this would have been easier though if reference type ranges had
> been disallowed. Too late now though. We'll just have to fix such bugs as we
> find them and strengthen the unit tests so that they get caught like they
> should be.

I think this whole issue is akin to the "transitory" discussion of a 
while ago.

Andrei




More information about the Digitalmars-d mailing list