digitalmars.D - Re: Resizable Arrays?
- bearophile <bearophileHUGS lycos.com> Feb 28 2009
- Lutger <lutger.blijdestijn gmail.com> Mar 01 2009
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
Feb 28 2009
bearophile wrote:Jason House>By dynamic, do you mean no length as part of the type or
Thy aren't hidden: when you grow a dynamic array you know an allocation
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?
Mar 01 2009