[Issue 8483] Definition of isOutputRange warped due to "put" implementation

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Aug 9 23:08:58 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=8483

--- Comment #6 from Jonathan M Davis <jmdavisProg at gmx.com> ---
Hmmmm. Well, that's certainly food for thought. Output ranges are definitely
for when you're writing out the final output, not for composability. However,
in many of the cases where an output range would be used, copy wouldn't make
sense, because the destination is really output (e.g. the console or a file)
and not a new input range. So, I question that it makes sense to try and
replace output ranges with copy, though I concur that in many cases where you
might use an output range, it makes more sense to use an input range and then
feed that into an output range if that's what you want.

Regardless, I think that it's something that merits a larger discussion in the
newsgroup.

The one thing that I keep meaning to bring up with output ranges is the lack of
ability to determine whether they're full (which becomes even more complicated
when dealing with stuff like chars where you can't know ahead of time whether
it's going to fit thanks to different encodings), but it's certainly never
occurred to me that copy could be thought of as a replacement for output
ranges.

--


More information about the Digitalmars-d-bugs mailing list