Why is std.string.format a c-style variadic function?

Jacob Carlborg doob at me.com
Sun Sep 25 23:26:52 PDT 2011


On 2011-09-26 05:39, Andrej Mitrovic wrote:
> I'm only asking because I can't use it inside of a pragma(msg) call
> since CTFE can't do C-style variadic functions yet. Is `format`
> defined this way for performance reasons? (to avoid template bloat?)

std.string.format is using a D-style variadic parameter list. This would 
be a C-style variadic parameter list:

extern (C) string format (int c, ...);

It might just be an old function from D1 when template tuple parameters 
where not just that much.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list