On Sunday, 8 November 2015 at 20:47:08 UTC, J.Frank wrote:
Hello again,
I'm a bit puzzled by the "File" type. Looking at the
implementation, it seems that all I/O functions were stuffed
into a single class^H^H^H^H^Hstruct.
What I expected to find is some kind of "Stream" class (with
read(), write(), eof()), which is extended by a "File" class
(with seek(), mmap(), etc.).
So, assuming my program reads from stdin and is supposed to
work on a file as well as on a pipe (which is not seekable) -
how can I make the compiler bark when I accidently use
stdin.seek()?
Am I missing something here, too?
Use ubyte/char input ranges. Post what you're trying to do if you
want an example.