On 7/2/2011 10:42 PM, Adam D. Ruppe wrote:
Jonathan M Davis wrote:
The range has to be mutable.
Is there any easy way around this, aside from casting away
the outer immutable?
It's a very annoying limitation that doesn't really have to be
there - I believe the language itself would let you pass immutable
int[] to a regular function that expects immutable(int)[], since the
outermost reference is passed by value anyway.
Just the pointer is passed by value, referencing elements in the array
mutate the source.