std.Stream.InputStream convenience functions

BBasile via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 6 13:05:17 PDT 2015


On Sunday, 6 September 2015 at 18:52:34 UTC, bitwise wrote:
> On Sunday, 6 September 2015 at 10:12:39 UTC, BBasile wrote:
>> On Sunday, 6 September 2015 at 04:48:56 UTC, bitwise wrote:
>>> On Sunday, 6 September 2015 at 03:42:20 UTC, BBasile wrote:
>>>> [...]
>>>> auto rng = StreamRange!(MemoryStream,long)(instance);
>>>> auto rng = StreamRange!(FileStream,float)(instance);
>>>> ---
>>>>
>>>> Actually I have nothing against your helper functions 
>>>> (except that they don't make Streams compatible with 
>>>> std.algorithm functions).
>>>
>>> Same problem... StreamRange(...) assumes that all data in the 
>>> stream is of the same type.
>>>
>>>   -Bit
>>
>> So Ranges are...
>
> So tell me how you expect to read a stream containing mixed 
> data types...

You should have got that's even not what i was talking about.
Basic summary of the conversation:

- you: hello what do you thing about my helpers functions?
- others: nothing, we won't add this because streams are 
deprecated. Maybe they'll come back one day if someone comes with 
a kind of "rangified" stream solution.
- you: how can I "rangify" a stream ?
- me: hello, you can add the ranges primitives.
- you: yes but it doesn't work for my particular case.
- me: (sigh) I know, I was talking about how streams can be 
rangified in a general way.

I think that the misunderstanding happens after 'others' 
intervention: 'other' did not suggested that your helper 
functions can be made in the "Range" fashion.


More information about the Digitalmars-d mailing list