[RFC] I/O and Buffer Range

Jason White 54f9byee3t32 at gmail.com
Sun Jan 5 03:08:47 PST 2014


On Sunday, 5 January 2014 at 09:33:46 UTC, Dmitry Olshansky wrote:
> As an advice I'd suggest to drop the 'Data' part in 
> writeData/readData. It's obvious and adds no extra value.

You're right, but it avoids a name clash if it's composed with 
text writing. "write" would be used for text and "writeData" 
would be used for raw data. std.stdio.File uses the names 
rawRead/rawWrite to avoid that problem (which, I suppose, are 
more appropriate names).

> Will poke around. I like this (I mean composition):
> https://github.com/jasonwhite/io/blob/master/src/io/stdio.d#L17

Yeah, the idea is to separate buffering, text, and locking 
operations so that they can be composed with any other type of 
stream (e.g., files, in-memory arrays, or sockets). Currently, 
std.stdio has all three of those facets rolled into one.


More information about the Digitalmars-d mailing list