I would think the best solution is to create a mutable local version, and then assign the immutable global one when you are done. If the array is particularly short (Like your example), then appending will work fine for your values (unless you mutate the array as part of it's calculation, then a local copy is required).
When you use the length property it allocates space and assigns
it to the immutable array. the array now contains data (10 0's).
You've said you won't change any data in it's declaration but the
array itself can be changed (appending or a different array).
- Immutable array initialization in shared static this Tommi
- Re: Immutable array initialization in shared static ... Jonathan M Davis
- Re: Immutable array initialization in shared static ... Matej Nanut
- Re: Immutable array initialization in shared sta... Minas Mina
- Re: Immutable array initialization in shared... Era Scarecrow