writefln patterns with mismatching compile-time known number of arguments

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Apr 13 08:10:15 PDT 2015


On Sun, 12 Apr 2015 14:31:40 -0700, H. S. Teoh via Digitalmars-d-learn
wrote:

> It's not hard to write a CTFE version of writef/writeln/etc., that takes
> the format argument at compile-time, since std.format itself is already
> CTFE-able.

i didn't know that (didn't checked, actually), so i rewrote simple string 
and number formatters in my iv.writer. anyway, `std.format` will allocate 
on "%40s", i believe, which is completely unnecessary for `write`, as one 
can write by arbitrary sized chunks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150413/3ce71e2b/attachment.sig>


More information about the Digitalmars-d-learn mailing list