Make typeof(T::Type) = Type{T}?

Hi Julia pros,

if we use e.g. typeof((Vector, Int, 1)) we get Tuple{UnionAll, DataType, Int}, which I guess is due to typeof(Vector) = UnionAll and the like.

Wouldn’t it be better for the compiler and hence performance if typeof(Vector) would return Type{Vector} respectively?


With it, probably also supertype would need to be changed, as then supertype(Type{Vector}) maybe should return UnionAll, instead of the current Any. However this would make sense to me, as Type{WithTypeParameter} is anyhow a special feature, which is not really related to normal uses of typeparameters.