I feel like I’m a bit late to the party on this one but I’m only now getting around to updating some code originally written in Julia 0.3, and was surprised to see this:
Array{Float64}(100)
now raises a warning telling me to use Array{Float64}(undef, 100)
instead. I’ve found the reference in the docs, but still don’t quite understand why undef
is now required.
However, upon updating all my code I also made this change to a SharedArray
constructor, to find that this raises an error as SharedArray
doesn’t have a method that includes the undef
argument. Can someone explain the reasoning behind this?
(NB this is all on Julia 0.7.0 on Win10)