Phobos Wish List/Next in Review Queue?

Piotr Szturmaj bncrbme at jadamspam.pl
Sun Nov 27 12:19:01 PST 2011


Manu wrote:
> On 26 November 2011 23:39, Walter Bright <newshound2 at digitalmars.com
> <mailto:newshound2 at digitalmars.com>> wrote:
>
>     On 11/26/2011 5:46 AM, Steven Schveighoffer wrote:
>
>         Ranges are not good for reading N bytes from a file
>         descriptor.
>
>
>     Why not? Isn't that exactly what a range is supposed to be good for?
>
>
> 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.

I think ranges are here to avoid memcopying and pointless allocations.


More information about the Digitalmars-d mailing list