Steven Schveighoffer wrote:
On Fri, 22 May 2009 21:22:55 -0400, Andrei Alexandrescu
<seewebsiteforem...@erdani.org> wrote:
1. Any range should be seamlessly and efficiently used as an input range.
This is the assumption I am challenging. I don't think you need this
assumptions for ranges to work. You can always bolt input range
functionality on top of a stream range if you want to treat a stream as
an input range for some reason.
I believe there is indeed a terminology problem. To me, "input range" ==
"stream" == "socket" == "bridge that is sinking under your feet as you
walk it". So to me there exists no "stream range". That to me is an
"input range".
But if foreach doesn't utilize the
popNext api, then streams require an unnecessary layer on top, just to
use foreach with them.
We can arrange that foreach uses popNext, but it must be worth it.
Andrei