by samatman · 2y ago · 0 comments
Zig is a static language without variadic parameters, so you can't make it optional in that sense. You could make the options a `?T` and pass `null` instead, but it isn't idiomatic, because passing `.{}` to a parameter expecting a `T` will fill in all the default values for you.
Arity N when you supply a value
Arity N-1 when you use the default