While I agree that making Tuple
an abstract vector is probably misguided, the covariance of Tuples actually makes this easy to answer: T = typejoin(String, UInt, Char)
.
julia> Tuple{String, UInt, Char} <: NTuple{3, Base.typejoin(String, UInt, Char)}
true
The above typejoin happens to be Any
, but that’s exactly what you also get when you use a vector as well.
julia> ["hi", UInt(1), 'c']
3-element Vector{Any}:
"hi"
0x0000000000000001
'c': ASCII/Unicode U+0063 (category Ll: Letter, lowercase)
Though of course, NTuple{N, typejoin(...)}
will disagree with Vector
once you get into promotion, e.g.
julia> [1, 1.0-im]
2-element Vector{ComplexF64}:
1.0 + 0.0im
1.0 - 1.0im
julia> typejoin(Int, ComplexF64)
Number