Hi, I read this in Julia doc (Types · The Julia Language)
julia> const T1 = Array{Array{T,1} where T, 1}
Array{Array{T,1} where T,1}
- What is the meaning of
const
in this context?- eg I built a variable like here below, and it is not very constant?
julia> aa=T1([[2.0],[6::Int64],["bof"]])
3-element Array{Array{T,1} where T,1}:
[2.0]
[6]
["bof"]
julia> aa[2]=[1];
julia> aa
3-element Array{Array{T,1} where T,1}:
[2.0]
[1]
["bof"]
I also tried this (without the const
) like this: T2 = Array{Array{T,1} where T, 1}
the difference with T1
is not clear to me.
- Where is the documentation for this use of
const
(ie in a type declaration context)?
Thank you!