Unpacking of variables that do not exist

Assuming reaction_system is a named tuple, you can merge it with another named tuple to provide defaults for some parameters. For example:

julia> params1 = (a=3, b=4)
(a = 3, b = 4)

julia> (; a, b) = merge((a=0,), params1) # default a=0 is ignored
(a = 3, b = 4)

julia> params2 = (b=4,) # missing a
(b = 4,)

julia> (; a, b) = merge((a=0,), params2) # default a=0 is used
(a = 0, b = 4)

(Here, I’m using the built-in property-destructuring syntax rather than @unpack from UnPack.jl.)