Yea I agree with @eksperimental here, this use of macros generally causes more trouble than it’s worth.
If you find yourself with functions that take too many arguments, consider creating a struct and then passing on that struct. For example:
defmodule SomeModule do
defstruct [shared1: "a", shared2: "b", foo: nil, bar: nil]
end
Then you construct a %SomeModule{} struct and it will take on the relevant defaults, and also provide a place to store other values you want to set. Then you can pass this to your various functions, and add extra arguments as appropriate.


















