struct{N} with internal NTuple{N,Int32}


I would like to use something like this:

struct Digits{N} <: Signed
     digits::NTuple{N, Int32}
     # ...

There can be many distinct values of N. Is there an approach which allows me the internalized tuple and does not risk overwhelming lower level system stuff when there are several hundred of distinct values of N in use?


What does this mean? Are you afraid that too many functions are getting specialized?


yes – exactly (the full complement of arithmetic ops, at least)

Is there any specialization that occurs with, say,
(+)(a::Struct{N}, b::Struct{M}) and N != M?
or does that occur only if the two are promoted to a single param value?