On 7/9/12 12:04 PM, Mehrdad wrote:
On Monday, 9 July 2012 at 15:48:35 UTC, Andrei Alexandrescu wrote:
On 7/9/12 11:35 AM, Mehrdad wrote:
If something is both an input range and an output range, then sure, it
can have that capability. But being able to write to something is
_orthogonal_ to whether you can read from it.

That is the case right now. The point is, with your design you need to
add something extra to allow writing to elements of a single-pass
range. So your design does not simplify things as much as it might seem.

Andrei

With your design you need to add something extra to allow writing to
elements of a single-pass range.

If that's the case, I'd hate to tell you this, but _unless_ you're
planning on removing the notion of input/output ranges (and perhaps
adding single-pass/multi-pass), you're doing it wrong. :-)

Given the smart-aleck nature of the comment I'd say s/hate/love/.

That capability is simply /not needed/ when your /only/ contract is that
something is an input range.

As I mentioned, "input range" is a misnomer. Think "one-pass range". The range can be written or not, and a multi-pass range (including random-access range) is also a one-pass range.


Andrei

Reply via email to