Fabian - Many thanks for your comments. This was very helpful.

(c) if I want to write code now that shouldn't break with 0.5, what should 
> I do?
>

I think when you need a copy, just surround your getindex with a copy 
function. (e.g. copy(x[:,10]) instead of x[:,10]). 

But this would lead me to make two copies. I was more interested in seeing 
whether there is a guideline on how to write code now so it doesn't have to 
be rewritten for 0.5.


Regarding this change I am also more on the sceptical side. I would very 
much prefer a copy-on-write like solution like Matlab and R provide, but I 
don't know if and how this would be possible to implement, so I don't raise 
my voice here. 
To me the main benefit of this change is that it drove the main developers 
to make array views much more performant and first class members of julia. 
As Tim Holy mentioned, the actual change seems to be be very small, but it 
needed and still needs a lot of work to make it possible. 


My own scepticism comes from the idea that using immutable objects 
throughout prevents bugs and one should only use mutable objects sparingly 
(primarily for performance - but I thought it shouldn't be the default)

Christoph



Reply via email to