Hello,

Is there a common idiom to pre-allocate a dynamic array. I mean allocating to 
avoid numerous re-allocations in loop, not setting length & filling content.
The differences are:
(0) no content --> no init
(1) one can simply append, instead of setting elements at defined indices
(2) one can append sub-sequences
(3) when the initially requested capacity is full, the array automagically 
resizes as needed (usng D's builtin dynarray realloc scheme).

Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com

Reply via email to