On Friday, 18 May 2012 at 16:38:22 UTC, Andrei Alexandrescu wrote:
Range concept is good abstraction if underlying container controlls ownership. But, in I/O we want to *move* ownership of bytes. Range is
not designed efficiently for the purpose, IMO.

Yes, yes, yes. Perfect thinking.

And I think the issues you brought up some time ago regarding to orphan ranges and non-GC allocators are also rooted in this fact, i.e. that the design of ranges is completely oblivious to data ownership concerns.

But as you said, it's a very convenient interface for algorithms, so…

David

Reply via email to