If you use the Base.@kwdef
you can use keywords to intialize the values. That in combination with keys()
, values()
, fieldnames()
, can give you the tools to build complicated constructors.
(If your structure is mutable maybe just using @kwdef solves all your problems)