stream interfaces - with ranges
Steven Schveighoffer
schveiguy at yahoo.com
Fri May 18 08:49:23 PDT 2012
On Fri, 18 May 2012 11:40:24 -0400, Mehrdad <wfunction at hotmail.com> wrote:
> On Friday, 18 May 2012 at 13:44:43 UTC, Steven Schveighoffer wrote:
>> On Fri, 18 May 2012 03:52:51 -0400, Mehrdad <wfunction at hotmail.com>
>> wrote:
>>
>>> On Thursday, 17 May 2012 at 14:02:09 UTC, Steven Schveighoffer wrote:
>>>> 2. I realized, buffering input stream of type T is actually an input
>>>> range of type T[].
>>>
>>> The trouble is, why a slice? Why not an std.array.Array? Why not some
>>> other data source?
>>> (Check/egg problem....)
>>
>> Well, because that's what i/o buffers are :) There isn't an OS
>> primitive that reads a file descriptor into an e.g. linked list.
>
>
> I beg to differ..
>
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa365469.aspx
It still reads into an array of buffers, which are slices. And the
resulting "range" looks *exactly* like a range of T[].
-Steve
More information about the Digitalmars-d
mailing list