I have an instance of a parametric type, is there a canonical way to get the parameter values? For example I could have some Array{T, d} and want to know whether T is Float64 and what its dimension is. The only way of doing this I am aware of is writing code like:
dimension{T, dim}(arr::Array{T, dim}) = dim numbertype{T, dim}(arr::Array{T, dim}) = T Is there a built-in function to do this? And maybe a way to get parameter values for arbitrary types? E.g. I have some instance of MyType{S, T, U, n} is and want to know U. Do I have to repeat code like the above each time I define a new parametric type?