Iterate over macros

This doesn’t make sense. struct params declares a type. You can only declare a type once.

If you want to declare multiple types in a loop, you can use @eval, but it doesn’t sound like that’s what you want here. You don’t need to declare a new type just to change parameters, just call the constructor to create an instance. (The point of @with_kw is to declare default values of the parameters, but you can override these in instances.)

3 Likes