Summary: It would be nice to have a function which read a file
lazily using a range
--- Comment #0 from Jonathan M Davis <jmdavisp...@gmail.com> 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------