Summary: It would be nice to have a function which read a file
                    lazily using a range
           Product: D
           Version: 2.040
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos

--- Comment #0 from Jonathan M Davis <> 2010-03-01 
23:13:24 PST ---
It would be great if there were a function which returned a range to a file,
reading it in as you moved through the range. Presumably, it would do some
buffering, but it wouldn't be a case of reading in the whole file at a time and
hopefully would be more friendly and powerful than reading in a single byte, or
int, or whatever like you'd do with read() with streams. It also avoids having
to explicitly read in a portion of the file at a time like you'd do with
readBlock(). In addition, it would make it possible to use various of the
standard algorithms directly on files.

It might also be useful to write to a file with a range, but I'm not acquainted
well enough with output ranges to know how well it would work, or if it would
be as useful as reading with ranges. It would probably be useful though.

In any case, I really like the idea of being to read a file with a range. Maybe
there's a reason that I'm not aware of which would make it a really bad idea,
but I think that it would be a good addition to phobos.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to