Resizable Arrays?

Lutger lutger.blijdestijn at gmail.com
Sun Mar 1 03:30:36 PST 2009


bearophile wrote:

> Jason House>By dynamic, do you mean no length as part of the type or 
resizable in place? Array resizing can lead to hidden allocations,<
> 
> Thy aren't hidden: when you grow a dynamic array you know an allocation 
generally takes place. If you don't want reallocations, then never grow or 
join them, and the reallocations will not happen. There's nothing hidden.
> 
> Bye,
> bearophile

I agree, it's something that I think is quickly understood by newcomers to 
the language. It's the same problem as string concatenation in C# and Java, 
where the common idiom is to use StringBuilder. I have seen such builders 
floating around in the ng, but is it phobos or tango already? 




More information about the Digitalmars-d mailing list