Is using

https://dlang.org/changelog/2.079.0.html#default_after_variadic

for instance as

void show(Args...)(Args args,
                   string file = __FILE__,
                   uint line = __LINE__,
                   string fun = __FUNCTION__)
    if (Args.length >= 1)
{
    ...
}

preferred over previous usage

template show(Args...)
    if (Args.length >= 1)
{
    void show(string file = __FILE__,
              uint line = __LINE__,
              string fun = __FUNCTION__)
    {
        ...
    }
}

or are the two version equally good in terms of run-time, compile-time and (lack of) template symbol bloatedness?

See also

https://github.com/nordlow/phobos-next/blob/master/src/dbgio.d#L53

Reply via email to