array.length++ not an lvalue

Koroskin Denis 2korden at gmail.com
Wed Jun 18 08:15:34 PDT 2008


On Wed, 18 Jun 2008 19:11:39 +0400, Fawzi Mohamed <fmohamed at mac.com> wrote:

> On 2008-06-18 16:30:39 +0200, "Koroskin Denis" <2korden at gmail.com> said:
>
> In the case of the length property this is very much so.
> Arrays are not the correct data structure for step by step resizes...  
> either try to have the correct size from the beginning, or switch  
> datastructure.
>

D arrays only grow exponentially, so no worries here (although it does  
consume some time to understand if the capacity is large enough to avoid  
resizing).



More information about the Digitalmars-d mailing list