Hi, I am a little confused about choice of type parameters either as data types or as literals, and would like to know their differences?
More specifically, when defining a parametric type, which takes, say, some integer value as some type of static size
parameter, like those in StaticArrays
, the type parameter sometimes was chosen as some N::Int
, other times as Tuple{N}
, where the former is an integer and latter a DataType
parameter that contains an integer, which contains the same unique info.
Another case is the choice of S::Symbol
vs Val{S::Symbol}
as type parameter, where the former is a symbol and latter a DataType
which contains a symbol.
What’s the difference between these choices? Does one have any advantage over the other?