On Friday, 28 November 2014 at 10:55:27 UTC, bearophile wrote:
In D code it's a good idea to set as const/immutable (where possible) all variables that don't need to change, for both safety and compiler-enforced code documentation. In my D functions sometimes I create dynamic arrays that later don't have to change length nor to be reassigned, but I have to mutate or assign their items.
Why you don't use static arrays for such a purpose? I thought this is exactly what they are made for, aren't they?