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.
Oh, I misread your comment. I agree, but I bet you run into issues when
it comes to appending data to your newly casted immutable(int)[]
reference (any appending would require a relocation). I should probably
re-read the D-slices article.