Array{T}(initialization,...) syntax

We’ve long supported constructing an Array with a set of known contents like Array(1:3) or Array(sprand(4,4,.4)). We want to generalize this to all iterables and all Abstract Array types, but the specifying-dimension-sizes-for-an-uninitialized-array is ambiguous: Is Array(2) constructing [2] or [#undef, #undef] (since numbers are iterable collections themselves)? Using an explicit initialization object allows us to disambiguate this case… and also support Array(3I, 5, 5) and maybe other clever yet-do-be-discovered things.

2 Likes