[Issue 9102] OutputRange should be ref parameter

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 24 10:15:55 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9102



--- Comment #11 from Nick Sabalausky <cbkbbejeap at mailinator.com> 2013-03-24 10:15:55 PDT ---
>Well, the problem with this is, you disable legitimate copies.  For example, if
>I wanted to save the current state because the next few bytes passed in may not
>be valid.
>
>I don't know if this is a valid concern, but it seems like that is solving
>the problem by curing the symptoms.

It's not a valid concern. If a range's state even *can* be saved, it is
supposed to be done via '.save'. Saving a range's state via copying is
undefined and reliant on the range's internal implementation details.

I'll grant that maybe saving a range *should* have been defined as being done
by an ordinary copy, plus postblit if necessary, and that a non-saveable range
should have been defined as having postblit disabled, but unfortunately that's
just not how ranges have been defined.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list