Hmm... Does it mean to have to relay three classes to do I/O processing?

auto handle = FileHandle("file");
scope (exit) handle.close();
auto buf = MemoryBuffer();
auto range = byLine(range);

I think it is slightly complicatedly. What is the reason why it must come to look like it?

BTW, I don't know well what buffers must do. What is the requirement of buffers?

(2010/09/21 14:05), Shin Fujishiro wrote:
SHOO<[email protected]>  wrote:
I think that there are two problems about I/O operation.
- Location of buffering layers.
- Direction of seeking.

...snip...

It is necessary for the concept to be divided in two at least to realize
them. (Handles and Ranges) Or more(+ Port or Stream).
The opening difficult item appears when I think about this.

How about putting a buffering layer between the two you said?  Not
only it just solves the who-does-buffering problem, but also opens a
bit of freedom in the lowermost I/O device layer.


Shin
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to