On Thursday, 27 March 2014 at 21:54:00 UTC, Andrei Alexandrescu
wrote:
On 3/27/14, 1:58 PM, Walter Bright wrote:
On 3/27/2014 12:50 PM, Andrei Alexandrescu wrote:
Yah, agreed. -- Andrei
Completely unworkable. To determine if a range is empty or
not, it may
have to actually read from its input. TTYs are an example.
Although
empty may then cache the result, and not read the second time
it is
called, an observer of TTY could see that an item was read
from the TTY.
That's a good point too.
Andrei
Maybe new kind of range can help?
Which has "bool popFront()" instead of "bool empty() + void
popFront()".