<div class="gmail_quote">On 26 November 2011 23:39, Walter Bright <span dir="ltr"><<a href="mailto:newshound2@digitalmars.com">newshound2@digitalmars.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 11/26/2011 5:46 AM, Steven Schveighoffer wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Ranges are not good for reading N bytes from a file<br>
descriptor.<br>
</blockquote>
<br></div>
Why not? Isn't that exactly what a range is supposed to be good for?<br>
</blockquote></div><br><div>It sounds like a bad idea to me... I can imagine ending up with a whole pile of allocations of short ranges, and then people doing bunches of range concatenations to re-assemble the buffer. That's a lot of pointless allocation and memcopying. D's apis should discourage inefficient usage like that.</div>