I think a simple example will explain better than I could myself.
What I want to do is something similar to:
immutable foo{1, T}
data::Vector{T}
end
immutable foo{2, T}
data::Matrix{T}
end
Just like you can specialize functions for different parameter value is
there a way to specialize the type of the field for a specific parameter
value.
What I reality want to do is to store second order symmetric tensors with a
vector as data and fourth order symmetric tensors with a matrix as data.
But I still want to be able to have my type as SymmetricTensor{dimension,
order}
// Kristoffer