[ENHANCEMENT] TypeParameters(Matrix{Float64})[eltype] === Float64
#10
Labels
enhancement
New feature or request
TypeParameters(Matrix{Float64})[eltype] === Float64
#10
An idea for simplifying the implementation could be to have a wrapper type
TypeParameters(T::Type) = TypeParameters{T}()
that you can index into to get the type parameters, i.e.:It may not be all that helpful since it could just make it harder for type inference and I'm not sure how much it will help the implementation, but I think it is interesting as a thought experiment.
I think a lot of concepts can map to the
TypeParameters
wrapper, i.e. defaults can be based aroundget
:I'm not really sure setting/specifying parameters really fits this interface though, since
setindex(TypeParameters(Matrix{Float32}), Float64, eltype)
doesn't make much sense. Part of the motivation could be to try to decrease the number of functions in the interface of the package, which is a lot at this point.The text was updated successfully, but these errors were encountered: