Range to array

bearophile bearophileHUGS at lycos.com
Sat Jun 30 04:40:12 PDT 2012


Namespace:

> Or should i prefer to use Ranges instead of arrays?

There is no short answer to this question. Arrays and lazy ranges 
have different qualities, so they are better for different 
situations. Arrays use more memory, but in some situations they 
are faster. Lazy ranges can be a little more complex to use. 
Often I use ranges where I can, and arrays in the other cases, or 
where I have to modify the array items many times.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list