Future of D style variadic fuctions

deadalnix deadalnix at gmail.com
Wed May 9 04:15:43 PDT 2012


Le 09/05/2012 08:10, SiegeLord a écrit :
> For the ignorant: I do NOT mean variadic templates as used by std.stdio.
>
> I note that they are not mentioned in TDPL. What is the deal with them
> and their future? I'll be very displeased if I have to recode a good bit
> of Tango that uses them if they are removed... None of my attempts at
> coding a replacement for them using variadic templates have matched
> their efficiency (in terms of generated code size) or ease of use (they
> invariably require a shim function).
>
> -SL

They are useful to interface with existing C code and variadic template 
have drawback (they for instance cannot be virtual).

I would discourage using such a feature, unless you are a lib writter 
that really know what he/she is doing, because it is unsafe. But they 
are too important to go.


More information about the Digitalmars-d mailing list