I know, that variadic templates are safer, but this use case requires that the parameter types and quantities should be statically unknown. It's all part of dynamic dispatch that I'm implementing.

For all we know they might interact with C. As far as I read on dlang.org it will require tons of ASM to adapt variadic ABI to non-variadic ABI.


On Thu, Dec 6, 2012 at 1:14 PM, Jonathan M Davis <jmdavisProg@gmx.com> wrote:
On Thursday, December 06, 2012 11:40:24 Gor Gyolchanyan wrote:
> I read about the d-style variadic functions and I also read the ABI.
> There are some vast differences in the ABI (the parameters are pushed in
> reverse order, the caller must clean the stack...).
> I thought that you guys have a better understanding of what's going on, so
> you might help me with this.
> If done carefully it could be a very valuable addition to std.functional.

I think that at this point, almost everyone just uses variadic templates when
they want a variadic function. Upon occasion, a typesafe variadic function
makes sense, but C style variadics basically never make sense unless you're
interacting with C, and in general, variadic templates are vastly superior to
D variadics, so it's the variadic templates get used. And as most of just use
the variadic templates, in the case of many of us, our knowledge of D style
variadics is low.

- Jonathan M Davis



--
Bye,
Gor Gyolchanyan.