Macro to create different sets of variables depending on the type of the macro argument

I agree with @ChrisRackauckas that usually when there is a collection of related variables involved, that is crying out to be wrapped in a type.

If there are two related but different collections of variables, that is two different types, probably with methods defined for the same functions on both types (e.g. an iterator over the basis vectors).

2 Likes