Feedback on Streams concept, similar to Ranges

Andrew andrewlalisofficial at gmail.com
Wed May 17 08:29:38 UTC 2023


On Wednesday, 17 May 2023 at 00:50:19 UTC, Monkyyy wrote:
> How would this help me with say rendering video and enforcing 
> frames are syncef? If T[] doesnt have any flexable logic?

I'm not really sure how you think that an IO stream library would 
help you particularly more than any other one would... that said, 
it would certainly be easier to enforce that frames are synced 
using this library than, say, Phobos ranges, because you can more 
gracefully handle stream errors without having to use 
exceptions/GC stuff.

Additionally, like Sergey suggested, I've added "buffered" 
streams, as decorators for any base stream, so that you could, 
for example, use a buffered input stream to read exactly as many 
bytes from a video stream as needed to fill a framebuffer (or 
something like that, I'm not familiar with video stuff).




More information about the Digitalmars-d mailing list