Andrei Alexandrescu Wrote:

> Whatever interface(s) we find work best for various kinds of streams, we 
> should make them play nice with ranges. Burst streams (the kind that 
> offer data in variable-size chunks) work great with a range interface.

I was thinking about chunk size to be supplied by user like this

int readInt()
{
  ubyte[] buffer=read(4);
  assert(buffer.length==4); // can this trigger?
  return *cast(int*)buffer.ptr;
}

Reply via email to