Suppose I want to define a type People that has two fields: names and ages. I would like names to hold a Tuple of String objects, and ages to hold a Tuple of Int objects. I would like both tuples to be of the same length.

I am currently parametrizing People and using the type parameter as the length of each Tuple.

struct People{N}
names::NTuple{N, String}
ages::NTuple{N, Int64}
end

Is this approach “correct”? I am asking because type parameters are supposed to define a family of types, and I am not exactly using the parameter for that purpose in this situation. Is there a nicer way of achieving the same result?