can we replace the variadic function stuff with the tuple-feature?

Xinok xnknet at gmail.com
Tue Jan 23 10:00:05 PST 2007


dennis luehring Wrote:

> (just an idea)
> 
> if we say that the parameterslist of a function is a 
> local-defined-and-typed tuple
> (maybe D should handle function parameters with an tuple-like concept)
> couldn't we get rid of the (another) variadic function concept and 
> replace it with the variadic template stuff...
> 
> ciao dennis

Tuples no. Tuples are template based, so if you were to use a different set of types for arguments, it would require a new instance of the function. This can result in some very large EXEs for relatively simple programs. Could you imagine using a separate instance of writefln for every different set of arguments you provided?
I would happily welcome a new concept which is more easily managed though.



More information about the Digitalmars-d mailing list