Yes, the 1 means that it’s a one-dimensional array. In general the types of arrays are of the form SomeArray{T,N}, where T is the element type and N is the number of dimensions.
I was really confused as why this would work, until I looked up the documentation:
getindex(type[, elements...])
Construct a 1-d array of the specified type. This is usually called with the
syntax Type[]. Element values can be specified using Type[a,b,c,...].
Examples
≡≡≡≡≡≡≡≡≡≡
julia> Int8[1, 2, 3]
3-element Array{Int8,1}:
1
2
3
julia> getindex(Int8, 1, 2, 3)
3-element Array{Int8,1}:
1
2
3
According to the documentation, the fact that Array{T, 1}() works is an additional method to the constructor: Constructors · The Julia Language
So, I agree that its use should be documented.
my personal take is that an empty constructor either doesn’t work (throw an error), or does something. The “something” has a pretty natural choice here for dense Array so idk if we need to give it some special place. But then again, adding a docstring costs nothing .
btw, T[] is mentioned in the Array section of the docs/Manual. It’s both shorter and clearer than Vector{T}()