Optional parameter T after a varargs T doesn't have clear semantics in how it's defined.
Example
proc test(a: varargs[string], b = "") =
  echo "a=", a
  echo "b=", b
test("hello")
test("hello", "world", "!")Actual Output
a=["hello"]
b=
a=["hello", "world"]
b=!
Expected Output
Not too sure...
Possible Solution
In my opinion, emitting a warning that says something along the lines "optional T after varargs T will cause the last argument of type T to be passed to the optional parameter!"
Additional Information
References